What is the name of this function declaration syntax only working in JScript (IE)? [duplicate]

StackOverflow https://stackoverflow.com/questions/21818481

質問

I recently came upon this code on the web :

function window::onload() {
    alert('onload!');
}

This (strange) syntax is only working in Internet Explorer (IE 8 in my case) and I wasn't sure of how it was called so I could search for it.

I simply want to know if there is some documentation related to this type of functions and if so, how are they called ?

役に立ちましたか?

解決

That is automatic event binding in JScript, similar to the Object_EventName naming convention in VBScript.

See: Scripting Events

Supposedly it has meen removed in later version of Internet Explorer, just as some other rarely used non-standard features.

他のヒント

MS-ES5EX ECMAScript extension for Event Handler Function Definitions

http://msdn.microsoft.com/en-us/library/ff955429.aspx

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top