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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -