javascript - Why is document.getElementById considered an object in IE8 -


i noticed document.getelementbyid function in firefox , chrome, while typeof considers object in ie8 (at least).

anyone has idea why?

ie8 (attempts to) implement ecmascript 3 typeof operator result implementation defined host objects regardless if object implements [[call]]. in es5, callable host objects must return "function".

see table in ecmascript 3

enter image description here

compare ecmascript 5.1 http://www.ecma-international.org/ecma-262/5.1/#sec-11.4.3


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -