Infrequently Noted

Alex Russell on browsers, standards, and the process of progress.

Comments for The Browser.Next List


From the top of my head:

XPath that works on documents created on the fly from strings as well as remotely fetched documents and the HTML DOM. An API that gives reliable absolute coordinates of any element relative to the upper-left corner of the document without all the current browser-specific madness. CSS selection APIs (those are in the process of being standardized and vendors are apparently busy implementing them). A reliable load event on script tags (ok, this one is really browser-specific and it's going to be fixed).

Hey Bertrand:

Those are great! I was thinking of fast positioning APIs at one point but somehow got through 10 things without mentioning them.

The lack of any such thing reliably causes no end of pain.Also, the XPath over the HTML DOM is also browser specific. Any chance it'll be fixed? ;-)

Regards

by alex at
 Event OpacityThere is a third way, promotied by Peter Michaux.  You create 4 separate shadows of the drag element, and arrange them around the mouse so as to leave a little box under the mouse.   Works very well.Keyboard Events and FormsMy other wish (albeit perhaps not good for accessibility) is that browsers were more consistent with their handling of keyboard events, and in particularly the ability to override the TAB KEY and ARROW KEYS.  Internet Explorer is the best.  Opera stubbornly refuses to let me preventDefault() or return false for tab keys and arrow keys on form elements.
Events for back/forward button handling (along with preventDefault). The ability to change the hash of the page without disrupting the page.
by Neil Roberts at
 Alex, you're more right than you think abou tit being browser specific ;) I'll ask someone over at IE about XPath over the DOM, and you ask Firefox about XPath over a dynamically created document (or you tell me how to do it without hacking the HTML DOM :) ). I don't know where Safari 3 stands with that but v2 had nothing. You know, maybe we should talk about that at the OpenAjax Interop meetings and try to coordinate some of that list and the dialog with vendors. We would probably have more weight this way.Cheers!
Re: Fast live collection -> Array transformsThere's already a spec for this, too--the JavaScript 1.6 Array generic slice function works perfectly.  I use it all the time in Greasemonkey scripts, as it has been implemented in Firefox for some time. (Aside: I was unable to submit this comment in Firefox--the error message was "please type a comment."  When I tried in Opera this page would flash up, rendered, and then go back to a blank white screen.  I had to fire up IE7 to post this comment.  Also, it should be possible to tab to this editor.  And to link text.)
Great post! I can see how a few of those would be really beneficial.

I think your blessed cache is interesting, but there is something I'd rather see: Site/Session persistent compiled JavaScript objects.

We spend a lot of time optimizing the file size for our libraries; as the guys at Plexo discovered, compile time grows non-linearly with file size (complexity, minification won't help much). It would be nice there was a way that we could store some collection of objects in such a way that they were accessible for every page load. That way we don't have to spend processor time rebuilding our TreeViewWidget prototype every time the page loads.

An @import for JavaScript would be great too, rather than always document.writing script tags.

Alex, I know you don't care too much about this, but I would like to see browsers with XSL capabilities allow the javascript protocol in the XSL document function. For example, document(javascript:makeXmlFromJson())/*
by Rob Koberg at
Here's your toArray() for live nodeLists:

var staticNodeList = [].slice.call(dynamicNodeList, 0);

Fast LiveCollection -> Array Transforms: You mean Array generics in ES3?

A prime example is Tino's (nice work!)

Tino, your example works in Firefox, Safari 2, and Opera 9.

Unfortunately, browsers are not required to support Array generics on a Host object. NodeList is a host object. Considering that

Microsoft has dragged their feet every step of the way, it's no surprise that Array Generics don't work with JScript.

What's on my list? Well, since you asked...

Form Serialization in HTML 5 http://dhtmlkitchen.com/rec/FormSerialization.html

URI in ES4 http://dhtmlkitchen.com/rec/URI.html

Data Structures in ES4 (haven't started on this yet)

Date Formatter in ES4 (haven't started on this yet)

Fix for IE: replace(JScript, Tamarin);

Regarding DontEnum, that's an article I'm working on now.

by Garrett at
Nikhil Kothari's list: http://www.nikhilk.net/Entry.aspx?id=120
Iteration, Enumeration, Primitives, and Objects

function assertEquals( baseId ) { var src = document.getElementById( baseId + "-source" ); var actual = String(eval( src.textContent || src.innerText )); var expectedEl = document.getElementById( baseId + "-expected" ); var expected = exp...