Boy did you open a can of worms!
Most of this was percolating in my mind for some time, but this has brought it 
to the fore.

1. I didn't have a Footer class, or recognize the <footer> tag. Didn't know 
anything about it.
That was an easy fix, just a few lines of code, but without it the critical 
section in your test3 didn't even run.

2. A.href side effects.
First some background. If you set document.location = url, that is not suppose 
to replace the document location object with the string url.
It is a side effect setter; the string is suppose to pass into the 
document.location URL object.
And it has a further side effect of redirecting the browser to a new web page, 
but that is beyond the scope.
I had thought for some time that A.href is suppose to do the same thing.
If javascript wants to set, or change, the URL that a hyperlink points to,
it will just set A.href = blah.
Right now that replaces the URL object with the string, and sometimes that 
works, but that's not how it is suppose to work.
It is suppose to be, and remain, a URL object.

A. href Image.src Script.src Frame.src Link.href Area.href Form.action
Am I missing any?

There is a clever compact way to do this; put getters and setters on the 
prototypes of these classes, similar to those that are on document.location.
See startwindow.js line 1078.
This change is mostly transparent to the rest of edbrowse, you get and set 
A.href as usual, and go through getters and setters, but did I break something? 
I wouldn't be a bit surprised.
Well test it out and let me know.
Meantime, the line

    r.setAttribute("href","http://www.nasa.gov/about/contact/index.html";);

from the NASA code now creates a URL object with the correct components.
But it still isn't rendered properly; see item 4 below.

3. This goes back to something Kevin said a month ago.
A web page was referencing A.protocol, which was never set.
He created a default empty string a.protocol = "", which got us past the error 
but made me feel uneasy.
I thought then, and still think, that this should be a getter and setter to dip 
into a.href.protocol.
It's basically a shortcut.
And similarly for the other components, so I made all these getters and setters.
See the two nested loops at startwindow.js line 1155.

4. Now the hyperlink was constructed properly, but was not rendered as a link 
in the edbrowse buffer.
I did not look dynamically, upon each render, to see if js had set, or changed, 
the url of that anchor.
Again, only a few lines of code, but it makes all the difference.
Now test3.html works.
As for nasa.gov, it's empty again. Did I break something?
I don't know, because it comes up empty on the earlier version, before I made 
any of these changes.
I backed out the last commit, with prepending "on" to the event, it still comes 
up empty.
And radiocaroline.co.uk hangs forever.
Are the websites changing out from under us? Am I missing something?   
(disappointed)
Well I decided to push anyways, so you all can look and comment,
and we're all working with the same code.

Karl Dahlke
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev

Reply via email to