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


Groups > comp.lang.javascript > #24601

Re: window.open allowing image to scale

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: window.open allowing image to scale
Date 2014-06-04 11:28 +0200
Organization PointedEars Software (PES)
Message-ID <2020767.akXlH5UOMh@PointedEars.de> (permalink)
References <_oqdnbF7roH_oBDOnZ2dnUVZ_qudnZ2d@westnet.com.au> <icydndWnyInWohDOnZ2dnUVZ_oKdnZ2d@westnet.com.au> <XnsA3415AC3A73ECeejj99@194.109.133.133>

Show all headers | View raw


Evertjan. wrote:

> Andrew Poulos <ap_prog@hotmail.com> wrote on 03 jun 2014 in
> comp.lang.javascript:

It is called attribution *line*, _not_ attribution novel.

>> To answer my own question, I just did this
>> 
>> var myPop = window.open("","","width=240,height=320,resizable,status=0);
>> myPop.document.open();
> 
> this .document.open() is not needed, it is implicit.

Only with HTML5:

<http://www.w3.org/TR/2014/CR-html5-20140204/webappapis.html#dom-document-write>

vs.

<http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-75233634>
 
>> myPop.document.write("<img src='images/puzzle.jpg' alt=''>");
>> myPop.document.close();
> 
> this .document.close() is not needed,

Wrong.  Because a script-created parser has no information about whether 
further content will be generated by script, the explicit document.close() 
is necessary to close the input stream for a document *created* with 
scripting.  Otherwise that document will load forever, and indicate that to 
the user by “wait”-shape pointer cursor.

<http://www.w3.org/TR/2014/CR-html5-20140204/webappapis.html#dynamic-markup-insertion>

> unless you want a second .document.write()
> to overwrite the document by inducing the implicit .open()

No, a second document.write() call will send further content to the same 
input stream unless it has been closed.
 
-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

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


Thread

window.open allowing image to scale Andrew Poulos <ap_prog@hotmail.com> - 2014-06-03 13:11 +1000
  Re: window.open allowing image to scale Andrew Poulos <ap_prog@hotmail.com> - 2014-06-03 13:19 +1000
    Re: window.open allowing image to scale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-06-03 08:55 +0200
      Re: window.open allowing image to scale Andrew Poulos <ap_prog@hotmail.com> - 2014-06-03 18:38 +1000
        Re: window.open allowing image to scale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-06-03 10:58 +0200
      Re: window.open allowing image to scale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-04 11:28 +0200
        Re: window.open allowing image to scale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-06-04 15:01 +0200
          Re: window.open allowing image to scale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-04 15:16 +0200
            Re: window.open allowing image to scale "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-06-04 16:51 +0200
        Re: window.open allowing image to scale John Harris <niam@jghnorth.org.uk.invalid> - 2014-06-04 14:47 +0100
          Re: window.open allowing image to scale Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-04 17:35 +0200
            Re: window.open allowing image to scale Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-06-04 18:18 +0200
              Re: window.open allowing image to scale John Harris <niam@jghnorth.org.uk.invalid> - 2014-06-05 11:12 +0100
            Re: window.open allowing image to scale John Harris <niam@jghnorth.org.uk.invalid> - 2014-06-05 11:03 +0100
              Re: window.open allowing image to scale Christoph Michael Becker <cmbecker69@arcor.de> - 2014-06-05 17:43 +0200
                Re: window.open allowing image to scale John Harris <niam@jghnorth.org.uk.invalid> - 2014-06-06 11:09 +0100
              Re: window.open allowing image to scale Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-06-08 19:41 +0100

csiph-web