edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* Re: [Edbrowse-dev] script in tree of document.written elements?
       [not found] <20170716000647.eklhad@comcast.net>
@ 2017-08-16  4:54 ` Kevin Carhart
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Carhart @ 2017-08-16  4:54 UTC (permalink / raw)
  To: Edbrowse-dev

On Wed, 16 Aug 2017, Karl Dahlke wrote:

> Ok, try it now - write objects under body.
> Only had to change a dozen lines of code.

That definitely did a lot!

There's a next thing going on, but there would be, wouldn't there.  Fixing 
one gets you the pleasure of being exposed to the problem that the first 
thing was masking out previously.  We can at least bask in the glory for 
a few minutes...




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Edbrowse-dev] script in tree of document.written elements?
  2017-08-16  3:29         ` Kevin Carhart
@ 2017-08-16  3:32           ` Kevin Carhart
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Carhart @ 2017-08-16  3:32 UTC (permalink / raw)
  To: Edbrowse-dev



> Could this actually be tidy-related?

Actually, scratch that, since dw is javascript.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Edbrowse-dev] script in tree of document.written elements?
  2017-08-16  2:53       ` Karl Dahlke
@ 2017-08-16  3:29         ` Kevin Carhart
  2017-08-16  3:32           ` Kevin Carhart
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Carhart @ 2017-08-16  3:29 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: Edbrowse-dev

On Tue, 15 Aug 2017, Karl Dahlke wrote:

> It was not at all clear to me, is not at all clear to me, where to put the objects that result from document.write.
> innerHTML is obvious, document.write isnot.

Thank you for wrangling it in the first place.  I think it's 
semi-deprecated or Considered Harmful.  There are various articles 
frowning on it.  So it's one of those annoying constructs that shouldn't 
be used, but here it is in the tests itself.

Okay.  I just opened hello.html in firefox and firebug.  It puts the P 
immediately after the script.  The P has parentNode body.  <Script> is 
not part of its tree branch.

I'm also in acid3.acidtests.org in firebug right now to verify with this.
I'm opening up the document.forms.  There is only one and it is one of 
those tags that is part of the document.write inside of the last script, 
so I think it's an illustrative piece of evidence and it's easy to make 
sure you're on the element you want to be on.

document.form[0].parentNode is map, and
document.form[0].parentNode.parentNode is body

> I thought they should parse under the script that does the 
> document.write, that is reasonable, rational, but not based on any spec 
> or anything.

I think that's right.  And with script omitted from their descendancy 
trail/tree branch.  Could this actually be tidy-related?

This is going to be good.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Edbrowse-dev] script in tree of document.written elements?
  2017-08-16  0:18     ` [Edbrowse-dev] script in tree of document.written elements? Kevin Carhart
@ 2017-08-16  2:53       ` Karl Dahlke
  2017-08-16  3:29         ` Kevin Carhart
  0 siblings, 1 reply; 5+ messages in thread
From: Karl Dahlke @ 2017-08-16  2:53 UTC (permalink / raw)
  To: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 817 bytes --]

It was not at all clear to me, is not at all clear to me, where to put the objects that result from document.write.
innerHTML is obvious, document.write isnot.
I thought they should parse under the script that does the document.write, that is reasonable, rational, but not based on any spec or anything.
If the document.write is from an onload or onclick function, not an obvious script,
then I put the objects in a nowhere place wherein they still get rendered so you see them in the buffer but aren't part of the js tree at all.
That can't be right.
See html.c line 559.
The short answer is, I could probably put them just about anywhere.
They could all go under document.body if that is where they're suppose to go.
Or document. You'll have to review the test and infer where they belong.

Karl Dahlke

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Edbrowse-dev] script in tree of document.written elements?
  2017-08-15 23:38   ` Karl Dahlke
@ 2017-08-16  0:18     ` Kevin Carhart
  2017-08-16  2:53       ` Karl Dahlke
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Carhart @ 2017-08-16  0:18 UTC (permalink / raw)
  To: Edbrowse-dev



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







^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-16  4:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20170716000647.eklhad@comcast.net>
2017-08-16  4:54 ` [Edbrowse-dev] script in tree of document.written elements? Kevin Carhart
2017-08-15 19:46 [Edbrowse-dev] acid3 log! Kevin Carhart
2017-08-15 23:04 ` Kevin Carhart
2017-08-15 23:38   ` Karl Dahlke
2017-08-16  0:18     ` [Edbrowse-dev] script in tree of document.written elements? Kevin Carhart
2017-08-16  2:53       ` Karl Dahlke
2017-08-16  3:29         ` Kevin Carhart
2017-08-16  3:32           ` Kevin Carhart

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).