[Prototype-core] Re: Suggested utility method(shortcut) $T for getElementsByTagname

2008-05-12 Thread kangax
For that you would probably need to extend or modify Ajax.Response class (i.e. its constructor which initializes responseXML property) - kangax On May 12, 10:19 am, disccomp [EMAIL PROTECTED] wrote: Is it possible to extend xmlResponse with Object.methods like select?

[Prototype-core] Re: Suggested utility method(shortcut) $T for getElementsByTagname

2008-05-12 Thread John-David Dalton
IE has issues extending XML Nodes. See http://dev.rubyonrails.org/ticket/9709 You must use Element#methodName instead or make a wrapper for it: Something like: (function( ) { var methods = Object.keys(Element.Methods).inject({ }, function(m, name) { m[name] = function() { return

[Prototype-core] Re: Suggested utility method(shortcut) $T for getElementsByTagname

2008-05-10 Thread Tobie Langel
There's already Element#select for that: $( element ).select( div ); Note that if you absolutely want that shortcut, you can always implement it locally like so: Element.addMethods({ $T: Element.select.methodize() }); Best, Tobie. On May 10, 9:45 am, 七星海 [EMAIL PROTECTED] wrote: How

[Prototype-core] Re: Suggested utility method(shortcut) $T for getElementsByTagname

2008-05-10 Thread kangax
I have once tripped on #methodize as well, but I believe it's not even needed here: Element.addMethods({ $T: Element.select }) - kangax On May 10, 6:37 am, Tobie Langel [EMAIL PROTECTED] wrote: There's already Element#select for that: $( element ).select( div ); Note that if you

[Prototype-core] Re: Suggested utility method(shortcut) $T for getElementsByTagname

2008-05-09 Thread Tobie Langel
How would tht be shorter than: $$('div') ? ;) Best, Tobie On May 9, 5:43 pm, disccomp [EMAIL PROTECTED] wrote: I think A shortcut for getElementsByTagname would help be really useful, so I thought I'd mention it. --~--~-~--~~~---~--~~ You received this