dart-gde / chrome.dart

Provide Dart interop with chrome.* APIs for Chrome Packaged Apps
Other
125 stars 48 forks source link

chrome.webRequest events throw when attaching listener :( #213

Open dylanPowers opened 9 years ago

dylanPowers commented 9 years ago

It appears that the proper arguments aren't being passed. In the documentation it's mentioned that a "filter" is required that at the very least must have a urls property defined.

This is the exception I get when I try to run onBeforeRequest.listen(data => print(data))

Exception: Uncaught Error: Error: Parameter 1 (filter) is required.
Stack Trace:
#0      JsObject._callMethod (dart:js:235)
#1      JsObject.callMethod (dart:js:225)
#2      _ensureHandlerAdded (package:chrome/src/common.dart:176:23)
#3      _runGuarded (dart:async/stream_controller.dart:669)
#4      _BroadcastStreamController._subscribe (dart:async/broadcast_stream_controller.dart:199)
#5      _ControllerStream._createSubscription (dart:async/stream_controller.dart:687)
#6      _StreamImpl.listen (dart:async/stream_impl.dart:474)
#7      main (chrome-extension://obaakcmlgkhenfocgiedogghmbencagi/main.dart:6:36)
apaulus commented 9 years ago

I'd like to bump this even though it looks like a duplicate of https://github.com/dart-gde/chrome.dart/issues/168