Question

Is it possible? I tried to insert the google dart api into page body and all I get is blank page, no script running...

Was it helpful?

Solution

You can currently not use Dart for writing extensions in Chrome as Dart is not available in it. There exists a Chromium version called Dartium that has Dart support build in, but the extension API in it does not seam to be Dart enabled just yet.

OTHER TIPS

There is the cool package chrome available at http://pub.dartlang.org that does axactly this

A library for accessing the Chrome APIs in a packaged app or extension.

Yes, it is straight forward. You need to create 3 Dart apps (for background, popup and options page) and use the dart:js package to communicate with the chrome extensions API.

Kudos to Chris Bucket for the blog entry about Using Dart for Chrome Packaged Apps.

UPDATE: It looks like the website from Chris Bucket has disappeared.

Dart is isolated form javascript and there is no common points to make calls between them. You can't even call any JS function from Dart. As long there is no dedicated interface for extensions API it isn't possible. But I looking forward to have this feature as well :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top