I vote an emphatic No - this would be overhead within proto-core, which
should remain as _baseline_ as possible (that's my rant and I'm sticking to
it - proto is a baseline - don't bloat it... please!). What people need to
get in the habit of doing is loading an "extensions.js" file (or something)
after proto (or lib-of-choice)... and do whatever overriding/wrapping there.

Your case in point...

var oldInsert = Element.insert;
Element.insert = function(...) {... fireYourCustomEvent() ...
oldInsert(...)};



On 9/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> I had an interesting thought while testing out version 1.6 RC - I
> thought I'd solicit some opinions (and possibly make a suggestion).
>
> There is not a very reliable cross-browser way to implement the DOM
> mutation events - (such as DOMNodeInserted, DOMNodeRemoved,
> DOMAttrModified, etc).  However, using custom events, it should be
> possible to register listeners for equivalents and send those events
> in prototype calls, such as Element.insert, etc.
>
> That would allow for some pretty powerful dynamic things - that can
> observe DOM change events.  1.6 already "spoofs" one of those events
> in the "contentloaded" event...it would be pretty cool to add a bit
> more support for others as well...
>
> What are peoples' thoughts on this?  Or would it better be implemented
> outside of prototype (I can't think of a way to piggyback on the
> already-existing functions without writing wrapper functions and
> extending things....possible, but it seems a bit cleaner to support it
> natively within prototype itself.
>
>
> >
>


-- 
Ryan Gahl
Manager, Senior Software Engineer
Nth Penguin, LLC
http://www.nthpenguin.com
--
Architect
WebWidgetry.com / MashupStudio.com
Future Home of the World's First Complete Web Platform
--
Inquire: 1-262-951-6727
Blog: http://www.someElement.com
LinkedIn Profile: http://www.linkedin.com/in/ryangahl

--~--~---------~--~----~------------~-------~--~----~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to