Uncaught TypeError: document.attachEvent is not a function

See original GitHub issue

I use this plugin and get this error Uncaught TypeError: document.attachEvent is not a function in chrome and edge browser. Does any plugin missing here?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
Dan503commented, May 30, 2016

The conditional comment needs to be

<!--[if lt IE 10]>
  <script src="flexibility.js"></script>
<![endif]-->

Flexbox doesn’t work in IE9 so it needs to be loaded there as well. Or it could even just be this since conditional comments don’t work in IE 10

<!--[if IE]>
  <script src="flexibility.js"></script>
<![endif]-->
2reactions
thehenstercommented, May 30, 2016

The fix is good to have 👍

It would be nice to have a conditional comment version in the readme. It’s a bandwith/connection saver.

<!--[if lte IE 9]>
  <script src="flexibility.js"></script>
<![endif]-->
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: TypeError: window.attachEvent is not a function
When attaching events in order to make it cross browser perform the following: if (target.addEventListener) { target.
Read more >
Uncaught TypeError: undefined is not a function in javascript
Solution 1. attachEvent function is only supported in IE. It's a not standard function and you should not use it! Use addEventListener[^] ...
Read more >
Uncaught TypeError: element.attachEvent is not a function
I'm getting an error on the checkout onepage, can you help me what cause of this error. enter image description here.
Read more >
Uncaught TypeError: document.attachEvent is not a function
I use this plugin and get this error Uncaught TypeError: document.attachEvent is not a function in chrome and edge browser.
Read more >
Is the window.attachEvent JavaScript method supported by ...
"A JavaScript Error was encountered while loading a page - CallError: window.attachEvent is not a function". If you open the same message using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found