Issue Is there a new tutorial on how to use a Javascript library in Dart? I’d like to use a color processing library (or better color-thief) in Dart, but I have not found a tutorial on how to use a
Continue readingTag: dart-js-interop
Using dart:js to stream audio through the SoundCloud JavaScript API
Issue I’m trying to write a library that will make it easer for dartisans to use the SoundCloud JavaScript SDK (http://developers.soundcloud.com/docs/api/sdks#javascript). I’m using the ‘dart:js’ library, and I’m only using one class to handle the proxy. class SCproxy { JsObject
Continue readingClosure call with mismatched arguments: function 'call' again
Issue Exactly one month ago I encountered this problem Closure call with mismatched arguments: function 'call' with js interop. Now I have the same problem with the SnapSVG library. I’m using it in combination with JsInterop since a moment. Today
Continue readingWhat is the performance of Dart and Javascript interop?
Issue I’m concerned about writing a Dart program where I need to interop with the D3 javascript library. A lot of data needs to be accessed from javascript but I would want to store that data in dart, my concern
Continue readingHow do you return values from javascript functions
Issue I’m using the js library in Dart to access OpenLayers. Pertinent code looks like: js.scoped(() { ol = js.retain(js.context.OpenLayers); var max_extent = new js.Proxy(ol.Bounds, -13652354.432172, 6026153.418145, -13574082.915218, 6065289.1766216); var restricted_extent = max_extent; if (controls == null){ var options =
Continue readingHow do you open a file chooser in a chrome packaged app with Dart
Issue There don’t appear to be any dart packages for this, so I’m using Javascript interop. This is what I’ve got so far: js.scoped(() { done(entry) { print(‘ok’); } js.context.doneCallback = new js.Callback.once(done); js.context.chrome.fileSystem.chooseEntry(null, js.context.doneCallback); }); It’s failing with: Uncaught
Continue readingBinding jqte (JQuery Text Editor) to a div from dart
Issue I need to translated the following JQuery code to Dart: $(“#writepad”).jqte(); I ‘ve tried the following but didn’t succeed: var jquery = new JsObject(context[‘window.jQuery(“#writepad”)’]); jquery.callMethod(‘jqte’); I’m trying this hoping that it may stop jqte from displaying dynamically generated buttons
Continue readingHow do you interact with js from dart?
Issue No, this isn’t the same as the other question of the same name. There are seemingly identical packages which seem to do this, but with different apis. http://dart-lang.github.io/js-interop/docs/js.html https://api.dartlang.org/docs/channels/stable/latest/dart_js.html Why are there two? Which one are we supposed to
Continue readingGreensock or any other Javascript lib in a dart project
Issue I’ve been trying unsuccessfully to use the Greensock JavaScript library in my new Dart projects. Any one has experience or can recommend me a guide or tutorial from dart where someone successfully uses an external JS lib ? Solution
Continue readinghow to call a jquery plugin from inside an angular.dart component?
Issue I am learning about angular.dart components by trying to make one that will access an existing jquery plugin. I am trying something like the following: library mylib; import ‘dart:html’; // querySelector import ‘package:js/js.dart’; // javascript import ‘package:angular/angular.dart’; @NgComponent( selector:
Continue reading