Predominantly for Karl , hi Karl:

I have several things to submit. There are a couple of areas where I'd like to find out if you think the entire class of correction is a mistake and wouldn't be good, before I make a patch out of it. Or I have discovered a couple of areas where I'd like to know if you think there would be a good approach.

(1) Not a JS problem for a change: Sites are creating kinds of tags with their own invented vocabulary as the type. These tag types are not in availableTags, so we get a message that the tag could not be created. For instance, Amazon and other pages want to create:
video
canvas
header
comment
fragment
nav
modernizr

Do we want to add these phrases to availableTags even though they are just made-up names? Probably not, since it becomes silly to hardcode an endless number of them. 'video' and 'comment' seem plausible, but 'modernizr' is just some library. Is there some way that availableTags could be amended on the fly and these and all future unencountered tag types would get a generic placeholder? The reason I for wanting to support these things would be that maybe the site's javascript expects to address its own tag type and then write to it later on.

(2) Amazon has a strange <script> block. It is not javascript. It is just a bunch of json in script tags, and the type is specified. This may be known as JSONP - I'm not sure. So it is like <script type="abc">{a:1,b:2,c:3}</script>. In prepareScript, you have code to check that the language is "javascript". What do you think about also testing the "type" attribute? If a script has a strange type specified, return without parsing.

(3) I think some page code within a timeout isn't getting to run, because it fails the strict test at the top of setTimeout where there must be 2 arguments and the second one must be numeric. Some of the jquery versions say this, for example:

setTimeout( callback );

It doesn't run, and good thing too, if the strictness is necessary. However, it seems like a lot of site developers consider just 1 argument to be legitimate. Should we loosen the test? I am worried about this either way. I tried it more lenient, and bad code seemed to run. It was hard to isolate but edbrowse was crashing - so I don't know what to do. I was between a rock and a hard place, so I just went on to something else. I bet this is a cause of some sites not working.

(4) I was wondering about a change in the event listener. At least some of the time, I have gotten events to work by having a kind of object called Event. Then you pass an object called 'click' or whatever it needs to be. I had some success with this on the Drescher page from Sebastian, in fact. (Sebastian points out that online banking is a higher priority to fix than Austrian metal with a sense of humor, but I happened to learn a lot from the Drescher site because they use jquery and xhr!)

So, in startwindow, the handler is currently fired off like a[i]();

But what if there was an argument inside the parentheses, which would be your event object.

So the eval block begins
eval('this.' + ev + ........................
var tempEvent = new Event
tempEvent.type = ev; // actually would be ev without the "on" prepended
a[i](tempEvent);} };');

That's enough for now, there are a lot of exciting areas to amend which I think will improve some sites. We have that whole iframe question as well. I also have some more normal additions I can submit soon for domLink and for the createElement switch statement in startwindow. For instance, elements need to have nodeType.

thanks for reading
Kevin

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

Reply via email to