Site Navigation

Showing posts with label What If. Show all posts
Showing posts with label What If. Show all posts

Friday, April 3, 2009

SVN Access to the IE Code Base for 24 hours!

SVN Access to the IE Code Base for 24 hours!

After all the April Fools' day fun, I had this dream the other night that (Dean Hachamovitch [MSFT]) suffering from a bit of a fever, had taken some over-the-counter medication that was making him feel light headed... and in a moment of inspiration decided that Microsoft should open up access to their code base to let other developers come in and fix some bugs.

The dream was over far too soon as the fever subsided and the access was closed 24 hours later.

However just imagining this brought a smile to my face. I told others and they laughed but agreed it would be great, and then there were those that told me this would never come true... "come on! Subversion Access? Hah! ROFLOL, Subversion! As if!"


What If?

Now lets just say that this magical turn of events did come true. You are provided with 24hours of SVN access to the IE Code Base... What would you want to fix?

Pick 2-3 things that would be first on your list that you would want to fix right away!

PS To Dean I/we wish you the best of health. This in no way whatsoever was meant as a bad thing.



Bug/Site Feedback |
Submit a bug

Tuesday, October 16, 2007

What If? - DOM Method Improvements

What If?

"Missing Methods" in the ECMAScript specification.

Having a complete specification for ECMAScript's DOM manipulation is great, however in time (as with any API) you yearn for some additional features.

IMHO, these methods would be great additions to the current spec.

Additions:

Object Element
getElementsByTagName(name, depth)
This method returns a NodeList.
The name parameter is of type DOMString.
The depth parameter is of type unsigned long.

With the optional depth parameter, developers can request what level of nesting they specifically wish to return.
If omitted, zero or negative, the default behavior of all matching child nodes is returned.

If requested, only elements at the requested level would be returned.

Example:
var allChildCells = myTable.getElementsByTagName('td');
var directCells = myTable.getElementsByTagName('td', 1);
var grandChildCells = myTable.getElementsByTagName('td', 2);

getElementsByClassName(class)
It is already on the way in HTML 5 (Web Applications 1.0)!
Better yet, it is real! Firefox 3 already has it!
And so does Opera 9.5!
And so does WebKit!

Object Node
insertAfter(newChild,refChild)
This method returns a Node.
The newChild parameter is of type Node.
The refChild parameter is of type Node.

Similar to the insertBefore method, except the newChild is inserted
after the refChild in the DOM tree.


Object NodeList
remove(index)
This method returns a NodeList.
The index parameter is of type unsigned long.

When a NodeList is returned from a method like .getElementsByTagName(name) it is
often desired to "filter" out undesired items.
Currently this is only possible by "casting" to an Array (a.k.a. iterate over the
NodeList and copy to an Array)



Ok, so not exactly a browser bug... but some interesting ideas.

What do you think? What methods would you add/modify?


Have your say!