edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] script in tree of document.written elements?
Date: Tue, 15 Aug 2017 17:18:41 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LRH.2.03.1708151706370.12666@carhart.net> (raw)
In-Reply-To: <20170715193834.eklhad@comcast.net>



I found out something potentially important and good.  It is relevant to 
test zero, and actually has implications for a lot of other tests.

Consider this mini page, hello.html

<HTML>
<BODY>
<SCRIPT>
document.write('<P>odd</P>');
</script>
</BODY>
</HTML>

Should the inserted <P> have <SCRIPT> in its series of parentNodes as it 
descends from document?

Here's my edited edbrowse transcript for this.  Asterisks signify my 
input.

* b hello.html
79
4
* jdb
* x1 = document.getElementsByTagName("P")
[object Object]
* x2 = x1[0]
[object Object]
* x2.parentNode.nodeName
script
* x2.parentNode.parentNode.nodeName
body

This is relevant to the acidtests because test zero runs removeChild of 
the last script.  The last script is this:

   <script type="text/javascript">document.write('<map name=""><area 
href="" shape="rect" coords="2,2,4,4" alt="<\'>"><iframe 
src="empty.png">FAIL<\/iframe><iframe 
src="empty.txt">FAIL<\/iframe><iframe src="empty.html" 
id="selectors"><\/iframe><form action="" name="form"><input 
type=HIDDEN><\/form><table><tr><td><p><\/tbody> 
<\/table><\/map>');</script>

So it merrily removes all of that stuff inside of document.write. 
Subsequent tests try to find those elements and they no longer exist!
If script does not occur in the tree of those iframe, form, etc,
then they will be available later on!

Kevin







  reply	other threads:[~2017-08-16  0:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15 19:46 [Edbrowse-dev] acid3 log! Kevin Carhart
2017-08-15 22:44 ` Karl Dahlke
2017-08-15 23:04   ` Kevin Carhart
2017-08-15 23:38     ` Karl Dahlke
2017-08-16  0:18       ` Kevin Carhart [this message]
2017-08-16  2:53         ` [Edbrowse-dev] script in tree of document.written elements? Karl Dahlke
2017-08-16  3:29           ` Kevin Carhart
2017-08-16  3:32             ` Kevin Carhart
     [not found] <20170716000647.eklhad@comcast.net>
2017-08-16  4:54 ` Kevin Carhart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.03.1708151706370.12666@carhart.net \
    --to=kevin@carhart.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).