Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #29033 > unrolled thread
| Started by | Joao Rodrigues <groups_jr-1@yahoo.com.br> |
|---|---|
| First post | 2015-12-23 18:26 -0200 |
| Last post | 2015-12-23 18:26 -0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.javascript
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: The Screen interface Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-12-23 18:26 -0200
| From | Joao Rodrigues <groups_jr-1@yahoo.com.br> |
|---|---|
| Date | 2015-12-23 18:26 -0200 |
| Subject | Re: The Screen interface |
| Message-ID | <n5f021$hif$1@speranza.aioe.org> |
On 23-12-2015 16:17, Stefan Ram wrote: > The page > > developer.mozilla.org/en-US/docs/Web/API/Screen > > contains » > > Screen.height > Returns the height of the screen in pixels. > > Screen.width > Returns the width of the screen. The Screen interface has been roaming the praries since when Netscape Navigator ruled the World Wide Web (geez!). Although Screen is specified in the CSSOM View Module [1], I think it is useless nowadays because our working canvas is the browser's viewport, and we can rely on CSS media queries (no JavaScript involved) if we need to adjust the design to the device's screen resolution, [2] [1] <http://www.w3.org/TR/cssom-view/#the-screen-interface> [2] <http://www.w3.org/TR/css3-mediaqueries> > > «. So /that's/ the difference between »height« and »width«: > »height« is measured in pixels, while »width« is measured > in an unspecified unit! ;-) According to the CSSOM View Module, the width / height attribute must return the width / height of the output device in CSS pixels. > > I often find the MDN to be quite mediocre. For example, in > the case above, I also do not deem properties to »return« > values. /Functions/ return values, properties /have/ them. Due to the lack of other good / reliable resources, MDN is a bless. But as MDN is a Wiki, everyone can contribute to it or spoil the party. > > Also, it is not necessary to always repeat the name of the > interface and to use a verb when a value is being described. > > So, I'd write this as (assuming that »width« /is/ in pixels): » > > The interface Screen > > height > the height of the screen in pixels > > width > the width of the screen in pixels See above. -- Joao Rodrigues
Back to top | Article view | comp.lang.javascript
csiph-web