I want my Firefox extension to add an object to the content window of the browsed page. I want it to have the same effect as running:
top.myobj = {val : 3};
inside a script element in the page.
Any ideas?
I don't think there is a security risk here as I only add an object with a single integer property. Is there a simple way to get the content window object from within the extension code?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…