[jbosstools-dev] Embedded javascript in the VPE visual document?

Marshall Culpepper mculpepper at appcelerator.org
Sat Aug 16 10:39:07 EDT 2008


I guess the next logical question is, where can I look to find the
Javascript disabling code? I've been doing lots of poking around looking for
it, but haven't had any luck... any pointers?

On Fri, Aug 15, 2008 at 9:33 PM, Marshall Culpepper <
mculpepper at appcelerator.org> wrote:

> 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)
>
>
> On Fri, Aug 15, 2008 at 6:33 PM, Max Andersen <manderse at redhat.com> wrote:
>
>> We do what we can to prevent javascript to execute in the editor to avoid
>> bad sidesffects -. Why do you need it ?
>>
>> /max (sent from my phone)
>>
>>
>>
>> On 15/08/2008, at 21.25, "Marshall Culpepper" <
>> mculpepper at appcelerator.org> wrote:
>>
>>  Hey guys..
>>>
>>> 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:
>>>
>>> public static void addScriptNodeToHead (VpePageContext pageContext,
>>> nsIDOMDocument visualDocument, String scriptSrc) {
>>>        nsIDOMNode headNode =
>>>  pageContext.getVisualBuilder().getHeadNode();
>>>
>>>        nsIDOMElement scriptNode = visualDocument.createElement("script");
>>>        scriptNode.setAttribute("src", scriptSrc);
>>>        scriptNode.setAttribute("type", "text/javascript");
>>>
>>>        headNode.appendChild(scriptNode);
>>>    }
>>> _______________________________________________
>>> jbosstools-dev mailing list
>>> jbosstools-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jbosstools-dev
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbosstools-dev/attachments/20080816/52ddae3e/attachment.html 


More information about the jbosstools-dev mailing list