Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #14991

Re: Cross-browser window resize or open to OUTER size

Path csiph.com!usenet.pasdenom.info!gegeweb.org!dedibox.gegeweb.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Content-Type text/plain; charset="ISO-8859-1"
Message-ID <6168516.zGrmvEn2Nd@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Organization PointedEars Software (PES)
Date Tue, 10 Jul 2012 10:37:15 +0200
User-Agent KNode/4.4.11
Content-Transfer-Encoding 7Bit
X-Face %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg==
Subject Re: Cross-browser window resize or open to OUTER size
Newsgroups comp.lang.javascript
References <op.wg7lthcttnmj2w@chris-bealls-imac.local>
Followup-To comp.lang.javascript
MIME-Version 1.0
Lines 61
NNTP-Posting-Date 10 Jul 2012 10:37:17 CEST
NNTP-Posting-Host 67faecef.newsspool3.arcor-online.net
X-Trace DXC=BjJ>^C@Zg?ElU`@c^jLCbJMcF=Q^Z^V3H4Fo<]lROoRA8kF<OcfhCOKQel<@S5]R;DDZm8W4\YJNLUFDj8T]K0?CDmniOZG;K0K6YP8H=hG1oF
X-Complaints-To usenet-abuse@arcor.de
Xref csiph.com comp.lang.javascript:14991

Followups directed to: comp.lang.javascript

Show key headers only | View raw


Chris Beall wrote:

> I had built a simple tool to test web pages in various standard window
> sizes.
> My standard sizes were based on common display hardware sizes, i.e. window
> maximized situations.
> It was just a page that included several lines like:
>    <a href="javascript:resizeTo(1280,1024)">1280x1024</a>
> each line tailored to a standard window size.
> With this page open in one tab, I could select a window size, then look at
> the page being tested in another tab to see how it reacted to that window
> size.
> If the browser didn't support tabbing, I would first select the window
> size from my tool page, then enter the URL of the page to be tested.
> Worked like a charm.
> 
> BUT, resizeTo stopped working (on FireFox, and apparently elsewhere as
> well) because it was deemed dangerous except in very restricted
> circumstances, including mine.  You can't resize someone else's window,
> you have to open your own.

That is not entirely correct.  There are Preferences to control that 
behavior, and privileges can be obtained by code to do that even though the 
relevant Preference is not set.  Other code implicitly has the privileges.  
See below.

> To get around that, I changed to:
>    <a href="javascript:var windowObjectReference = window.open('',
> '_blank', 'outerWidth=1280,outerHeight=1024,scrollbars')">1280x1024</a>
> which works fine....on FireFox.

You should not be using `javascript:' URIs at all; see the FAQ.

> But IE doesn't understand outerWidth and outerHeight and neither do
> several other browsers.
> They just use height and width.  BUT they apparently interpret it as
> meaning INNER height and width (documentation of the interpretation is
> often sketchy).

I find the (cross-browser) documentation at MDN rather enlightening:

<https://developer.mozilla.org/en/DOM/window.open>

> For my purposes, I need to set the OUTER height and width to simulate a
> hardware device with those physical limits.

But the outer height and width rarely counts, since very few people would 
have a browser window in full-screen mode.

> Is there any cross-browser way to open a window with a specified OUTER
> width and height?

Use <http://chrispederick.com/work/web-developer/> instead.


PointedEars
-- 
    realism:    HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness:    XHTML 1.1 as application/xhtml+xml
                                                    -- Bjoern Hoehrmann

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Cross-browser window resize or open to OUTER size "Chris Beall" <Chris_Beall@prodigy.net> - 2012-07-09 22:42 -0400
  Re: Cross-browser window resize or open to OUTER size Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-07-10 10:37 +0200
    Re: Cross-browser window resize or open to OUTER size "Chris Beall" <Chris_Beall@prodigy.net> - 2012-07-10 11:51 -0400

csiph-web