[Prototype-core] Re: Prototype's use of global variables

2008-08-19 Thread T.J. Crowder
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

[Prototype-core] Re: Prototype's use of global variables

2008-08-19 Thread John-David Dalton
@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

[Prototype-core] Re: Prototype's use of global variables

2008-08-19 Thread kangax
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

[Prototype-core] Element wrapper draft notes

2008-08-19 Thread kangax
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. -

[Prototype-core] Re: Element wrapper draft notes

2008-08-19 Thread kangax
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'