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

Uncaught TypeError: Cannot read property 'cssText' of null #3

Open
bstoppel opened this issue Sep 14, 2012 · 5 comments
Open

Uncaught TypeError: Cannot read property 'cssText' of null #3

bstoppel opened this issue Sep 14, 2012 · 5 comments

Comments

@bstoppel
Copy link

Chrome 21 is throwing this error...
Uncaught TypeError: Cannot read property 'cssText' of null

And Firefox 15 is throwing this error...
NotSupportedError: Operation is not supported
var supportsCSSText = getComputedStyle(document.body).cssText !== "";

It looks like it is on line 5.

@bugs181
Copy link

bugs181 commented Dec 27, 2013

Same here for node-webkit

@bhargavdt3
Copy link

asxsadadsad

@bhargavdt3
Copy link

pingpingpingping

@bitfidget
Copy link

@bstoppel and @bugs181 the cssText null issue can be fixed by calling the script at the end of your document (not in the head). It needs to know what document.body is, and if you call the script in your head, document.body is not yet defined.
Try calling your script at the bottom of your body, it will work.

@allenhwkim
Copy link

We can use async to load the script
<script src="lib/domvas.js" async></script>

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

5 participants