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

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

Pergunta

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 ?

Foi útil?

Solução

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.

Outras dicas

MS-ES5EX ECMAScript extension for Event Handler Function Definitions

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top