<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Marshall Culpepper wrote:
<blockquote
cite="mid:ab04aa740808172001m17e39ed2ode54720383138c78@mail.gmail.com"
type="cite">
<div dir="ltr">Rhino is a possibility, but it seems silly to load 2
seperate javascript interpreters (Seamonkey for XULRunner and Rhino for
Java..) at the same time when Seamonkey is already available (or at
least could be).<br>
<br>
Maxim/Sergey, any pointers?<br>
</div>
</blockquote>
1)For know we are not support execution of java script in visual editor.<br>
To allow javascript we should switch off design mode, but know it's
hard to do, because all selections events <br>
processing throw nsISelectionController which can be obtained only
if we switch mozilla in design mode. <br>
2) possibly JavaScript that inserted into head node doesn't be executed
automatically, because browser executes this scripts <br>
when documents are loaded. When we insert it into DOM, document already
loaded.<br>
<br>
PS. Using of JavaScript in Visual Editor can strongly change the
process handling, because we can modify dom using js, and using <br>
xpcom, there then many questins how to map elements from source and
visual part and others.<span style="color: rgb(128, 128, 128);"></span>
<blockquote
cite="mid:ab04aa740808172001m17e39ed2ode54720383138c78@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
<div class="gmail_quote">On Sun, Aug 17, 2008 at 8:49 AM, Max Rydahl
Andersen <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:max.andersen@redhat.com">max.andersen@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;">
<div class="Ih2E3d">On Sun, 17 Aug 2008 04:44:20 +0200, Marshall
Culpepper <<a moz-do-not-send="true"
href="mailto:mculpepper@appcelerator.org" target="_blank">mculpepper@appcelerator.org</a>>
wrote:<br>
<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Right, but I'm trying to avoid reinventing the wheel ;) I guess I have
no<br>
other recourse?<br>
</blockquote>
<br>
</div>
I guess using rhino or some other javascript interpreter you should be
able to do whatever you want in javascript -<br>
assuming your javascript spits out something that can be inserted into
a DOM tree...<br>
<br>
To find out where in VPE javascript is disabled/enabled we should hear
from Maxim or Sergey which know it better than I.<br>
<br>
-max<br>
<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div class="Wj3C7c"><br>
On Sat, Aug 16, 2008 at 11:27 AM, Max Andersen <<a
moz-do-not-send="true" href="mailto:manderse@redhat.com"
target="_blank">manderse@redhat.com</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 class="Wj3C7c">This is why you write templates - to
simulate the rendering :)<br>
<br>
/max (sent from my phone)<br>
<br>
On 16/08/2008, at 16.39, "Marshall Culpepper" <<a
moz-do-not-send="true" href="mailto:mculpepper@appcelerator.org"
target="_blank">mculpepper@appcelerator.org</a>><br>
wrote:<br>
<br>
I guess the next logical question is, where can I look to find the<br>
Javascript disabling code? I've been doing lots of poking around
looking for<br>
it, but haven't had any luck... any pointers?<br>
<br>
On Fri, Aug 15, 2008 at 9:33 PM, Marshall Culpepper <<<a
moz-do-not-send="true" href="mailto:mculpepper@appcelerator.org"
target="_blank">mculpepper@appcelerator.org</a>><br>
<a moz-do-not-send="true"
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 class="Wj3C7c">At runtime, our widgets are rendered
using Javascript. It would help<br>
tremendously if we could execute the same script in VPE so I don't have
to<br>
reinvent the wheel in Java.... (though calling into JS using Rhino is<br>
another option, but I'm guessing nowhere near as effecient)<br>
<br>
<br>
On Fri, Aug 15, 2008 at 6:33 PM, Max Andersen < <<a
moz-do-not-send="true" href="mailto:manderse@redhat.com"
target="_blank">manderse@redhat.com</a>><br>
<a moz-do-not-send="true" href="mailto:manderse@redhat.com"
target="_blank">manderse@redhat.com</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 class="Wj3C7c">We do what we can to prevent javascript
to execute in the editor to avoid<br>
bad sidesffects -. Why do you need it ?<br>
<br>
/max (sent from my phone)<br>
<br>
<br>
<br>
On 15/08/2008, at 21.25, "Marshall Culpepper" <<<a
moz-do-not-send="true" href="mailto:mculpepper@appcelerator.org"
target="_blank">mculpepper@appcelerator.org</a>><br>
<a moz-do-not-send="true"
href="mailto:mculpepper@appcelerator.org" target="_blank">mculpepper@appcelerator.org</a>>
wrote:<br>
<br>
Hey guys..<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 class="Wj3C7c"><br>
I was curious if it's possible to execute javascript by adding
<script><br>
nodes into the head node the same way that <link> nodes are added
for CSS<br>
styles. I've created a method that does it for me locally, but the
script in<br>
question doesn't seem to be executing... is there something special
needed<br>
to make javascript work in this document? Here's my snippet:<br>
<br>
public static void addScriptNodeToHead (VpePageContext pageContext,<br>
nsIDOMDocument visualDocument, String scriptSrc) {<br>
nsIDOMNode headNode =<br>
pageContext.getVisualBuilder().getHeadNode();<br>
<br>
nsIDOMElement scriptNode =<br>
visualDocument.createElement("script");<br>
scriptNode.setAttribute("src", scriptSrc);<br>
scriptNode.setAttribute("type", "text/javascript");<br>
<br>
headNode.appendChild(scriptNode);<br>
}<br>
_______________________________________________<br>
jbosstools-dev mailing list<br>
</div>
</div>
<<a moz-do-not-send="true"
href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a>><a
moz-do-not-send="true" href="mailto:jbosstools-dev@lists.jboss.org"
target="_blank">jbosstools-dev@lists.jboss.org</a>
<div class="Ih2E3d"><br>
<<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev"
target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a>><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev"
target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a><br>
<br>
</div>
</blockquote>
<br>
</blockquote>
<br>
</blockquote>
<div class="Ih2E3d">_______________________________________________<br>
jbosstools-dev mailing list<br>
<a moz-do-not-send="true"
href="mailto:jbosstools-dev@lists.jboss.org" target="_blank">jbosstools-dev@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev"
target="_blank">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a><br>
<br>
<br>
</div>
</blockquote>
</blockquote>
<br>
<br>
<br>
-- <br>
<font color="#888888">-max<br>
</font></blockquote>
</div>
<br>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
jbosstools-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jbosstools-dev@lists.jboss.org">jbosstools-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a></pre>
</blockquote>
<br>
</body>
</html>