allmarkedup/jQuery-URL-Parser — pull request #34 by omarqureshi (2012-09-05 09:47:47+00:00)
Title: Editable attributes

The following is not perfect, but is a basic implementation of using attr with function overloading ... it is backwards compatible with the current implementation.

attr('foo') does whatever it does currently, however attr('foo', 'bar') sets foo to bar and bubbles up any building dependencies of foo and returns whatever bits need to be set.

I've added a basic test suite which i used to build the functionality, but, if there are any edge cases that you think need to be addressed, just add them to the suite and I'll try and fix.