Johan, when we say wrapper we don't mean a div in HTML.
We mean instead of extending the native DOM elements
$(element) - returns an extended dom element
$(element) - returns an instance of a ElementWrapper class
the class interacts with the element but does not extend it directly.
see kangax's
Kangax looks good.
I think that it should be $() instead of $W(), but for the purpose of
clarity during the
discussion the use of $W is fine.
I think that any method that returned element, will instead return
NodeWrapper.
Any method that returned an array of elements will return a
On Aug 20, 10:13 am, John-David Dalton [EMAIL PROTECTED]
wrote:
Kangax looks good.
I think that it should be $() instead of $W(), but for the purpose of
clarity during the
discussion the use of $W is fine.
I think that any method that returned element, will instead return
NodeWrapper.
Any
I like where all this is heading -- thumbs up, Kangax.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from
kangax wrote:
...
If the node list returns 1 element then methods like $$
(...).getValue() should return the value of that element.
(this is how jQuery handles it)
This could lead to ambiguity. We should probably discuss it more.
I agree that it is ambiguous. I find the selector result
@Key Snyder - correct I was assuming Array.prototype was not extended
and that we were using wrappers.
@kangax
I don't think there would be confusion with things like $$
(..).getValue() here.
Keep in mind users do use the equiv of $$('#myId') and that in those
cases you are expecting 1 result
...
I forked prototype, and started working on NodeWrapper/NodeListWrapper
- http://github.com/kangax/prototype/tree/master/src/element.js
Accompanying tests are there as well (although the test suite is far
from being complete).
--
kangax
Exciting to see in code! What about adding caching
On Aug 21, 12:15 am, Ken Snyder [EMAIL PROTECTED] wrote:
... I forked prototype, and started working on NodeWrapper/NodeListWrapper
-http://github.com/kangax/prototype/tree/master/src/element.js
Accompanying tests are there as well (although the test suite is far
from being complete).