This project is archived and is in readonly mode.

#195 ✓invalid

class Element can't be extended

Reported by akaIDIOT | July 4th, 2008 @ 11:00 PM | in 2.0 (closed)

Extending the Element class can be very useful for adding events to custom classes or treating it as a real DOM object. As shows extending Element leads to errors that I haven't been able to resolve; it is impossible to pass an example element or tagname to the parent's constructor (final clause $(tag).setProps evaluates to null).

A possible solution would be to default the first argument to "div" (although I am nowhere near familiar enough with the core of mootools to make assumptions like this).

Comments and changes to this ticket

  • akaIDIOT

    akaIDIOT July 5th, 2008 @ 12:12 AM

    • Tag changed from core, defect, element, enhancement, request to core, docs, element, enhancement

    I was pointed to a blogpost by Jan Kassens about this issue making ones life easier:

    As the post states: it is an undocumented feature and a good one at that. So: please document this to make a whole lot of people's lives a better one :)

  • Jan Kassens

    Jan Kassens July 5th, 2008 @ 08:59 AM

    • State changed from “new” to “invalid”

    element is not extendable as its not a real class. closing this ticket as a duplicate of #172

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket