Mark Thom wrote:

I'm trying to add a new entry to the editor context menu and have met with a few problems. I installed the overlay via xpi and in spite of the fact that everything seems to be in perfect working order, the new entry is not being toggled when it should. The jar package directories are listed in my installed-chrome.txt, so I know it can't be a registration problem.

Actually that's not true, you need to check chrome.rdf and overlayinfo/editor/overlays.rdf too.

My only guess is that my addEventListener mechanism isn't working properly. It's listed as follows.

window.addEventListener("load", OnLoadFunction, false);

function OnLoadFunction()
{
        var element = document.getElementById("editorContentContext");
        element.addEventListener("popupshowing", ToggleOption, false);
}

The ToggleOption function sets the oncommand and disabled attributes of the new entry element. I've been told that the first line of code should be executed automatically once composer starts up, but I suspect that it isn't happening. Any ideas?


If you load the overlay file (using its chrome URL) in the browser, does it try to run the load function? If you inspect composer, can you find your script element? Note that DOM inspector doesn't show the text of inline script. If you enable chrome errors do you see any errors in the JS console? If you enable the dump function, try using it to output to the console (use -console on windows).

--
Warning: May contain traces of nuts.

_______________________________________________
mozilla-editor mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-editor

Reply via email to