User tests: Successful: Unsuccessful:
This PR fixes the console error being produced in J4:
document.head.insertAdjacentElement is not a function
Category | ⇒ | JavaScript |
Status | New | ⇒ | Pending |
also http://caniuse.com/#feat=insert-adjacent
@C-Lodder can you share the actual console.log?
Also which browser gives this error?
ah sorry, it was insertAdjacentElement
, not insertAdjacentHtml
Firefox
I can't replicate it in none of Firefox stable, Firefox Developer edition and Firefox Nightly
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-09-09 15:11:01 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
According to MDN: https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentElement
this function exists even in IE8 so
document.head.insertAdjacentElement('beforeend', newScript);
is fine!