Side navigation
#12235 closed bug (fixed)
Opened August 10, 2012 06:18AM UTC
Closed August 10, 2012 11:34PM UTC
getComputedStyle is used without namespace
Reported by: | brilliantpenguin@gmail.com | Owned by: | rwaldron |
---|---|---|---|
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)"
Attachments (0)
Change History (7)
Changed August 10, 2012 02:47PM UTC by comment:1
milestone: | None → 1.8.1 |
---|---|
status: | new → open |
Changed August 10, 2012 10:05PM UTC by comment:2
component: | unfiled → css |
---|---|
owner: | → mikesherov |
priority: | undecided → low |
status: | open → assigned |
This was done to save bytes. I guess it's not worth the savings to break node.
Changed August 10, 2012 10:07PM UTC by comment:3
owner: | mikesherov → brilliantpenguin@gmail.com |
---|---|
status: | assigned → pending |
jQuery on Node.js? Are you using jsdom? If so, then you should create a window property on the global
object
Changed August 10, 2012 11:10PM UTC by comment:4
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.
Changed August 10, 2012 11:11PM UTC by comment:5
status: | pending → new |
---|
(the comment previous is my comment)
Changed August 10, 2012 11:21PM UTC by comment:6
owner: | brilliantpenguin@gmail.com → rwaldron |
---|---|
status: | new → assigned |
Right, got it. Fix coming