M
M
Makor2010-09-14 16:16:32
Google Chrome
Makor, 2010-09-14 16:16:32

Strange behavior of Google Chrome 6

There is a piece of code. Inside some function. In FF3 both messages are the same and expected. In Chrome 6, the second message returns null. Who knows why?

_ondblclick = 'some_function();';
ondblclick = 'some_function();';

alert(_ondblclick);
alert(ondblclick);



Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
madimp, 2010-09-14
@madimp

Apparently, Chrome does not allow writing to the global scope (which is essentially window) variables that have event handler attribute names.
In a different scope, what is needed alerts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question