stop using wrapedJSObject with exportFunction; remove createObjectIn

This commit is contained in:
Will Bamberg
2016-08-19 14:09:44 -07:00
parent 0bed6de14d
commit 6ecc596ca3
+1 -12
View File
@@ -7,8 +7,7 @@ function notify(message) {
chrome.runtime.sendMessage({content: "Function call: " + message});
}
window.wrappedJSObject.notify = exportFunction(notify, window);
exportFunction(notify, window, {defineAs:'notify'});
/*
Create an object that contains functions in the content script's scope,
then clone it into the page script's scope.
@@ -23,13 +22,3 @@ var messenger = {
};
window.wrappedJSObject.messenger = cloneInto(messenger, window, {cloneFunctions: true});
/*
Create an object in the page script's scope.
*/
function notify2(message) {
chrome.runtime.sendMessage({content: "Object method call 2: " + message});
}
var messenger2 = createObjectIn(window.wrappedJSObject, {defineAs: "messenger2"});
messenger2.notify = exportFunction(notify2, messenger2);