Reputation: 71
2 days ago, my web-extensions program have no problem.
But today, same program make below error.
=====
Error: Expected an object as the target scope
Schemas.jsm:2641:15
let obj = Cu.createObjectIn(context.cloneScope);
=====
enviroment: Firefox Developer Edition 60.0b2(64bit)
=====
This is java script for popup.
The point that the error is occur is below:
chrome.extension;
chrome; < no error
chrome.extension; < error
Upvotes: 1
Views: 51
Reputation: 71
It is changed not to be able to access chrome.extension on a window.unload event in a popup.
Now, I've resolved this error.
// error
window.unload = function() {
var ex = chrome.extension; //error : Expected an object as the target scope
}
// fixed
function access_extention() {
var ex = chrome.extension;
}
window.onblur = access_extention;
window.onbeforeunload = access_extention;
Upvotes: 1