问题
When I create page-workers for pages in the twitter.com
domain, nothing happens.
lib/main.js
:
var pw = require("sdk/page-worker");
pw.Page({
contentScript: "console.log(window.location.href)",
contentURL: "https://google.com"
});
pw.Page({
contentScript: "console.log(window.location.href)",
contentURL: "https://twitter.com"
});
Console output is as follows:
console.log: twitter-worker: https://www.google.com/
That's all, folks. I haven't yet gotten a content script to run for any page-worker using any Twitter URL is its contentURL
. Is this some kind of trick to get us to use Twitter's API?
来源:https://stackoverflow.com/questions/27085661/are-firefox-add-on-sdk-page-workers-twitter-incompatible