Aleksandar Toplek
Aleksandar Toplek

Reputation: 2831

Chrome Extensions + Dart

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

Upvotes: 12

Views: 3580

Answers (4)

Draško Kokić
Draško Kokić

Reputation: 1290

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.

Upvotes: 3

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657248

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.

Upvotes: 6

Pawel Uchida-Psztyc
Pawel Uchida-Psztyc

Reputation: 3838

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 :)

Upvotes: -1

Lars Tackmann
Lars Tackmann

Reputation: 20865

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.

Upvotes: 8

Related Questions