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

document.defaultView.getComputedStyle is null #9

Open
tmlee opened this issue Sep 27, 2013 · 4 comments
Open

document.defaultView.getComputedStyle is null #9

tmlee opened this issue Sep 27, 2013 · 4 comments

Comments

@tmlee
Copy link

tmlee commented Sep 27, 2013

Probably not specific to this plugin, is anyone getting a null returned from calling document.defaultView.getComputedStyle?
https://github.com/dfcreative/jquery.waterfall/blob/master/jquery.waterfall.js#L572

It happens when i am running a Jasmine test.

Hacky but not sure if its right to wrap it with a conditional..
if(style != null)?

@zandergrin
Copy link

I get an error

Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

https://github.com/kudago/waterfall/blob/master/jquery.waterfall.js#L564

@kosso
Copy link

kosso commented May 3, 2015

me too.

@ckollars
Copy link

ckollars commented Dec 4, 2015

I'm getting the same error.

Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

https://github.com/kudago/waterfall/blob/master/jquery.waterfall.js#L960

@ckollars
Copy link

ckollars commented Dec 7, 2015

I figured out my error issue

My theme file had my concatenated script loading in the head along with jQuery. Once I moved the files to the footer there was no error. I assume it's because the scripts were blocking the DOM from finish loading so once the scripts fired there wasn't a body tag that https://github.com/kudago/waterfall/blob/master/jquery.waterfall.js#L960 was referencing since the DOM was still loading.

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

4 participants