chrome.declarativeContent.onPageChanged should be an chrome.CromeEvent instance, not a Stream
Opened this issue · 3 comments
In the JavaScript API, the onPageChanged
has methods for manipulating rules, like addRules
and other. In chrome.dart this object is a plain Stream instance (which cannot be listened on, this throws an exception).
In trying to figure out how I am supposed to get to the addRules
method, I tried also
var e = new chrome.ChromeEvent();
e.addRules('onPageChanged', [...]);
but that fails with
Exception: NoSuchMethodError: method not found: 'addRules'
Receiver: Instance of 'JsObject'
Arguments: ["onPageChanged", Instance of 'JsArray', Closure: ([dynamic]) => dynamic]
It may also be relevant that
print(chrome.events.available);
prints false
for me.
I am also stumped by this, were you able to figure this out?
@srk9 If I remember correctly, I just wrote this part in JavaScript. I simply needed to ShowPageAction
on relevant websites, this is isolated from the rest of the app, it is configuration, essentially, so switching languages is no problem.
Yah thats what I had to also. Thanks for the response.
On Mon, Mar 7, 2016 at 4:19 AM jirkadanek notifications@github.com wrote:
If I remember correctly, I just wrote this part in JavaScript. I simply
needed to ShowPageAction on relevant websites, this is isolated from the
rest of the app, it is configuration, essentially, so switching languages
is no problem.—
Reply to this email directly or view it on GitHub
#161 (comment)
.Warmest Regards,
Dustin Gelegonya