Strange behavior of Google Chrome 6


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
5 views
There is a piece of code. Inside a certain function.

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

alert(_ondblclick);
alert(ondblclick);


In FF3, both messages are the same and expected.
Chrome 6 — second message gives null.

Who knows why?
by | 5 views

1 Answer

0 like 0 dislike
Apparently, Chrome does not allow to write in the global scope (which in fact have window) variables with the attribute names of the event handlers.
\r
In a different scope alertid what you need.
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
27,059 users