Opened 11 years ago
Closed 11 years ago
#12235 closed bug (fixed)
getComputedStyle is used without namespace
Reported by: | Owned by: | Rick Waldron | |
---|---|---|---|
Priority: | low | Milestone: | 1.8.1 |
Component: | css | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
v1.8.0 L:6612 says:
"computed = getComputedStyle( elem, null )"
but in any other place, you are using window.getComputedStyle.
I'm using jQuery on Node.js, then it's a big problem.
I want to fix to window.getComputedStyle same as the "If( window.getComputedStyle)" in L:6609.
or change L:6609 to "if(getComputedStyle)"
Change History (7)
comment:1 Changed 11 years ago by
Milestone: | None → 1.8.1 |
---|---|
Status: | new → open |
comment:2 Changed 11 years ago by
Component: | unfiled → css |
---|---|
Owner: | set to mikesherov |
Priority: | undecided → low |
Status: | open → assigned |
comment:3 Changed 11 years ago by
Owner: | changed from mikesherov to brilliantpenguin@… |
---|---|
Status: | assigned → pending |
jQuery on Node.js? Are you using jsdom? If so, then you should create a window property on the global
object
comment:4 Changed 11 years ago by
Yes. I'm using jsdom and create window on global namespace. but unfortunately on Node.js, the top scope is not window but global. so that I can access to window.getComputedStyle but cannot access to "getComputeStyle" because of "no such a function". It does not happen v1.7.2 so that I wrote a bug report.
comment:6 Changed 11 years ago by
Owner: | changed from brilliantpenguin@… to Rick Waldron |
---|---|
Status: | new → assigned |
Right, got it. Fix coming
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Use window.getComputedStyle to prevent breaking jsdom/node.js . Fixes #12235
Changeset: 3722aef8be5d31a7dbf3de6998cdf249081f028c
This was done to save bytes. I guess it's not worth the savings to break node.