Opened 12 years ago
Closed 12 years ago
#8797 closed bug (invalid)
jQuery innerWidth() throws ownerDocument is null
Reported by: | Justin Nel | Owned by: | Rick Waldron |
---|---|---|---|
Priority: | high | Milestone: | 1.next |
Component: | dimensions | Version: | 1.5.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
jQuery 1.5.1 AND 1.5.2 (jsFiddle only offers 1.5.1 at the moment) Firefox 4.0 Windows 7 Ultimate x64
I would have expected a value from $(document).innerWidth(), but instead it throws an exception.
Exception thrown: TypeError: elem.ownerDocument is null
Example code: http://jsfiddle.net/PwRgy/
If you need more information, please ask.
Change History (4)
comment:1 Changed 12 years ago by
Component: | unfiled → dimensions |
---|---|
Priority: | undecided → high |
Status: | new → open |
comment:2 Changed 12 years ago by
Owner: | set to Rick Waldron |
---|---|
Status: | open → assigned |
comment:3 Changed 12 years ago by
comment:4 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
So it does. Now that I think about it, getting innerWidth from document doesn't make sense because the document itself can't have padding.
Note: See
TracTickets for help on using
tickets.
Wondering if this is invalid. If you read http://api.jquery.com/innerWidth/ it says: "This method is not applicable to window and document objects; for these, use .width() instead."