ginerjm Posted May 18, 2016 Share Posted May 18, 2016 I have a copy of lightbox running on my site that included a 'prototype.js' file that has been running for years. Lately, during debugging the IE developer tools is stopping on this line with the error shown: var el = document.createElement('<input name="x">'); InvalidCharacterError This line is part of this: var HAS_EXTENDED_CREATE_ELEMENT_SYNTAX = (function(){ try { var el = document.createElement('<input name="x">'); return el.tagName.toLowerCase() === 'input' && el.name === 'x'; } Can anyone provide a work-around for this or should I just not worry about it? Quote Link to comment https://forums.phpfreaks.com/topic/301210-error-in-prototypejs/ Share on other sites More sharing options...
kicken Posted May 20, 2016 Share Posted May 20, 2016 You most likely have your developer tools configured to stop on all errors. During a normal run that error would be caught by the try{} block and ignored. That function is testing to see if the browser supports using createElement with a full tag. The standards compliant way to use createElement is to specify only the tag name, such as: document.createElement('input'); To get IE to ignore it while debugging you need to change the exception behavior. There is a button for this in the toolbar that looks a bit like a stop sign. Shortcut is ctrl+shift+e. Quote Link to comment https://forums.phpfreaks.com/topic/301210-error-in-prototypejs/#findComment-1533109 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.