Search code examples
javascriptjscript

What does ‘::’ (double colon) do in javascript for events?


I saw this code and I'm scratching my head trying to decide how it works.

<SCRIPT LANGUAGE=javascript> 

     function SpeechMikeControl::SPMEventButton(lDeviceID, EventId) {
        alert("lDeviceID=" + lDeviceID + ", EventId=" + EventId);
     }

</SCRIPT>

double colon? This is from using a philips speech mike from a web page.

Any idea what this double colon means? It seems like a syntax error to me but it works! (at least in IE).


Solution

  • I've been able to find an obscure reference in some scanned manual from Microsoft Office Infopath 2003. It appears to be a JScript syntax:

    a double colon is used as separator between the script ID and the event name

    My guess is that's not part (or no longer part) of Internet explorer's ECMAScript implementation but it belongs (or used to belong) to Microsoft Office's implementation.