note: you need to have userscript running in web page
- web page can nuke sandbox early
Code: Select all
window.dispatchEvent(new Event("unload"))
- web page can define setter on pop-up (it's weird how this inside setter is window and not sandbox)
Code: Select all
open(location.href).__defineSetter__("conlog",function(v){ console.log("%O.conlog=%O",this,v) alert("!!!") })
- function are not exported correctly (same error if you do conlog.apply inside userscript)
Code: Select all
open(location.href).__defineSetter__("conlog",function(v){ try{ v.apply }catch(err){ console.error(".apply",err) } try{ Function.prototype.bind.call(v,null) }catch(err){ console.error("bind",err) } alert("!!!") })