<div dir="ltr">At runtime, our widgets are rendered using Javascript. It would help tremendously if we could execute the same script in VPE so I don't have to reinvent the wheel in Java.... (though calling into JS using Rhino is another option, but I'm guessing nowhere near as effecient)<br>
<br><div class="gmail_quote">On Fri, Aug 15, 2008 at 6:33 PM, Max Andersen <span dir="ltr"><<a href="mailto:manderse@redhat.com">manderse@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
We do what we can to prevent javascript to execute in the editor to avoid bad sidesffects -. Why do you need it ?<br>
<br>
/max (sent from my phone)<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
On 15/08/2008, at 21.25, "Marshall Culpepper" <<a href="mailto:mculpepper@appcelerator.org" target="_blank">mculpepper@appcelerator.org</a>> wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
Hey guys..<br>
<br>
I was curious if it's possible to execute javascript by adding <script> nodes into the head node the same way that <link> nodes are added for CSS styles. I've created a method that does it for me locally, but the script in question doesn't seem to be executing... is there something special needed to make javascript work in this document? Here's my snippet:<br>
<br>
public static void addScriptNodeToHead (VpePageContext pageContext, nsIDOMDocument visualDocument, String scriptSrc) {<br>
nsIDOMNode headNode = pageContext.getVisualBuilder().getHeadNode();<br>
<br>
nsIDOMElement scriptNode = visualDocument.createElement("script");<br>
scriptNode.setAttribute("src", scriptSrc);<br>
scriptNode.setAttribute("type", "text/javascript");<br>
<br>
headNode.appendChild(scriptNode);<br>
}<br></div></div>
_______________________________________________<br>
jbosstools-dev mailing list<br>
<a href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a><br>
</blockquote>
</blockquote></div><br></div>