Thanks,
Yes, I’m using
the Mozilla Embedded Browser, opened by the line MozBrowserUtil.openMozillaBrowser(url).
Where I can find some documentation about DOM API’s? I try doing in this
way, but didn’t work…
private static MozillaBrowser browser;
browser = MozBrowserUtil.openMozillaBrowser(url);
nsIDOMDocument document = browser.getDocument();
nsIDOMNode head = document.getElementsByTagName( "HEAD" ).item(0);
nsIDOMHTMLScriptElement script =
(nsIDOMHTMLScriptElement)(document
.createElement("SCRIPT")
.queryInterface(nsIDOMHTMLScriptElement.NS_IDOMHTMLSCRIPTELEMENT_IID));
// Hidden tag
from the tools
script.setAttribute( "class", MozIDEUIPlugin.ATF_INTERNAL );
nsIDOMText scriptContent = document.createTextNode( scriptBuffer.toString()
);
script.appendChild( scriptContent );
head.appendChild(
script );
Thanks again,
Victor Emanuel
From: atf-dev-bounces@xxxxxxxxxxx
[mailto:atf-dev-bounces@xxxxxxxxxxx] On
Behalf Of Gino Bustelo
Sent: quarta-feira, 27 de junho de
2007 16:40
To: AJAX Toolkit Framework
discussion
Subject: Re: [atf-dev] Adding a
_javascript_ object on Mozilla
Not exactly sure what you
mean... If you are referring to the ATF's Embedded Browser, to add _javascript_
to a page you can use the DOM APIs to add a Script tag and then set the content
text with your script.
Thanks,
Gino Bustelo
ATF Developer