This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29579 - "The width attribute must return the width of th..."
Summary: "The width attribute must return the width of th..."
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM View (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-20 03:32 UTC by Chris Rebert
Modified: 2016-08-25 12:24 UTC (History)
0 users

See Also:


Attachments

Description Chris Rebert 2016-04-20 03:32:42 UTC
https://drafts.csswg.org/cssom-view-1/#dom-screen-width

[[
The width attribute must return the width of the output device, in CSS pixels.

The height attribute must return the height of the output device, in CSS pixels.
]]

Other than when the Fullscreen API (or equivalent) is being used, I can't think of a legitimate reason for a webpage to need to know the dimensions of the screen (as opposed to the dimensions of the viewport or window).
And Fullscreen makes the viewport occupy the entire screen, so again, the webpage can just query the viewport's dimensions.
I suppose these attributes might've useful when positioning/sizing popup windows? But popup windows are increasingly legacy, custom-positioned ones doubly so.

The spec should allow privacy-conscious browsers to return the dimensions of the window or viewport for these properties, rather than revealing the size of the screen.