Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reserved word "class" breaks ie8 usage #12

Open
ichabodcole opened this issue Mar 31, 2015 · 1 comment
Open

Reserved word "class" breaks ie8 usage #12

ichabodcole opened this issue Mar 31, 2015 · 1 comment

Comments

@ichabodcole
Copy link

FYI, "class" is a reserved word in ie8 so breakpoint.class causes an error. It's easy to get around this by using breakpoint['class'], but might be good to point this out in the "Events" portion of the docs to avoid tears.
The library also breaks in ie8 because of this issue when pulling in through bower though, so I would suggest using the above work around or not using the word class in the library. (If you want to support ie8 that is, which I can understand if you don't)

@jchaney01
Copy link

To support IE8:

Change 'class' to 'klass' in applicable areas and then:

scope.breakpoint.windowSize = $window.innerWidth;

to

scope.breakpoint.windowSize = $window.innerWidth || $document[0].documentElement.clientWidth || $document[0].body.clientWidth;

Since IE8 does not have innerWidth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants