Alternative for "for, EVENT" that works on Mozilla Firefox?

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by ellescuba27, Nov 30, 2013.

  1. ellescuba27

    ellescuba27 Member

    Messages:
    274
    Likes Received:
    3
    Trophy Points:
    18
    So I was looking through the Virtools documentation. For those who don't know, Virtools has a plugin which can be used in sync with Javascript. But the documentation is old. Like, Netscape old. Anyways, I happened upon this code snippet, and the doc said this will only work in Internet Explorer:
    Code:
    <script language="JavaScript" for="Virtools" EVENT="CompositionLoadedEvent(param)">
      alert("CompositionLoadedEvent = " + param);
    </script>
    And, true to it's word, it does not work in Mozilla Firefox 26 Beta. Although it does work in IE10.
    But as I said, the doc is old, and the first question I asked myself was "what's with the for attribute on the script tag?" I mean, I've seen it used on labels, but never on a script tag. And the EVENT attribute... again, what's up with that? I had never seen that before even off of a script tag!
    Mozilla's wiki, naturally, didn't have anything about it in their specifications, but MSDN did here: http://msdn.microsoft.com/en-us/library/ie/ms533746(v=vs.85).aspx
    So apparently, Virtools (which is indeed the ID of the plugin) is triggering an event called CompositionLoadedEvent, and this is some sort of crazy event handler for it.
    Does anyone know of a more modern workaround that will work in Mozilla Firefox? I can't modify the event handler, it's part of the plugin, but using addEventListener or document.Virtools.CompositionLoadedEvent didn't seem to work either.
    Thank you in advance
     

Share This Page