javascript - dojo.exists fails with IE11 -


since few days, have troubles internet explorer 11 in conjunction dojo toolkit 1.9.4 hosted domino server.

source code:


if (dojo.exists("btnupload")) {     console.log("btnupload exist ... something..."); } else {     console.log("btnupload doesn't exist..."); } 

with ie11 return value of dojo.exists() false!

ie11 debugger:


enter image description here

however in other browser (mozilla firefox, google chrome, apple safari) works!

using dojo.exists isn't appropriate, given btnupload technically dom id, , not actual object in global scope. if (document.getelementbyid('btnupload')) seem far more appropriate in case.

when global reference encountered doesn't match actual global variable, match dom id, browsers tend return dom node, wouldn't recommend relying upon that.


Comments

Popular posts from this blog

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -