// Grab some basic infrastructure off the content window. var win = XPCNativeWrapper.unwrap(window); SpecialPowers = win.SpecialPowers; Cu = SpecialPowers.Cu; is = win.is; ok = win.ok; SimpleTest = win.SimpleTest; var bound = document.getElementById('bound'); // This gets invoked by an event handler. window.finish = function() { // XBL scope, with 'wifi-manage' scope testWifiPermissionFromXbl(true, true /* with wifi-manage permission */); SimpleTest.finish(); } eval('var testWifiPermissionFromXbl = ' + win.testWifiPermissionFromContent.toSource()); // XBL scope, with no 'wifi-manage' permission testWifiPermissionFromXbl(true, false /* without wifi-manage permission */); // Hand things off to content. Content will call us back. win.go();
Mozilla Bug 946815

Bound element