var el = new Prototype.Element(element);
el.raw, or el.obj, or el.wrapped, or el.source.
I kinda dig el.source
`source` sounds good.
It's not very important, but I can't say source appeals. I think it
will be confusing in discussion. The underlying element is as much a
target as a
@kangax
Whatever the name is I think it should be used in all wrappers.
This makes it consistent.
If you want to check if a wrapper is of a certain instance.
if( wrapper instanceof Prototype.Node ) {
//wrapper.raw
}
else if (wrapper instanceof Prototype.NodeList) {
//wrapper.raw
}
...
I
On Aug 19, 12:03 pm, John-David Dalton [EMAIL PROTECTED]
wrote:
@kangax
Whatever the name is I think it should be used in all wrappers.
This makes it consistent.
If you want to check if a wrapper is of a certain instance.
if( wrapper instanceof Prototype.Node ) {
//wrapper.raw}
else
As per a recent discussion
http://groups.google.com/group/prototype-core/browse_thread/thread/16d0517ecc605a00
I have made a few notes regarding a potential semantics of an element
wrapper implementation : )
== Notes:
- The notion of `NodeWrapper` is used to refer to such element
wrapper.
-
On Aug 20, 12:02 am, Walter Lee Davis [EMAIL PROTECTED] wrote:
On Aug 19, 2008, at 11:46 PM, kangax wrote:
$W('foo').wrap('div', { className: 'bar' }); // NodeWrapper around a
newly created `div` element with class=bar
Sorry to barge in the middle here, but could you clarify what 'foo'