xul - using popupNode in a javascript firefox extension -
I'm trying to use Popapadod in a slightly javascript-based Firefox extension. So if a user right-clicks a link and then clicks on additional menu item, a new tab opens with a link (like "Open in a new tab"):
`var foo = {OnLoad: function () {// initialization code this.initialized = true; },
onMenuItemCommand: function () {
var tBrowser = document.getElementById ("content"); Var target = document.popupNode; Tbrowser.selectedTab = Tab; Var tab = tabroauzer.editab (target);
}};
window.addEventListener ("load", function (e) {foo.onLoad (e);}, incorrect);
`
It mostly works, but I am thinking that it is the right use. The problem is that I want to change some characters on var target, but do not work in any way partdoes will cause some problems like Target.replace () so I'm guessing target is not a string.
Most of all I would like to know is what popappode really does ...
thanks
Peter
I really do not use "poppadod" But the normal nodes are not the same as the wire. I suggest reading on the Document Object Model (DOM) to learn more.As far as the text is in place, something similar can work for you, regarding popup nodes as other nodes:
var target = document.popupNode ; Target.innerHTML = target.innerHTML.replace ("old_string", "new_string")
Comments
Post a Comment