59625Re: [svg-developers] Re: Create script element
- Nov 29, 2007At 07:53 PM 11/28/2007, Domenico wrote:
>David, Erik,I also was unable to get it working in ASV, whence all my dabbling
>Sorry for my post being a little unclear.
>works for Opera and Firefox. One question was if there's an
>alternative that works for Safari and ASV as well.
about with DOM. In IE/ASV I was able to confirm that the <script>
element had been created, but I could not find any way to locate the
functions within it, nor to run said functions. With a "normal"
inline script, the text of the script including its function are
available as the nodeValue of the relevant tag, but such does not
seem to be for .es/.js files.
The one workaround that comes to mind is the following -- embed the
SVG in HTML and then load the script tag into HTML using DOM methods.
The following works in IE, Opera, Safari and FF (with a simple
alert("hello") statement in the alert.js file), so that could provide
Of course if browsers other than Opera would support foreignObject,
then we could insert a tiny HTML object in the middle of our SVG
instead of the other way around and use it to work around what
appears (to me) to be an IE/ASV limitation.
- << Previous post in topic Next post in topic >>