I just want to say how much I love invoke. I don't know why we didn't have
it years ago.

On Sun, Nov 28, 2010 at 3:08 AM, Arian <[email protected]> wrote:

> Indeed, you shouldn't have used Native.implement because it was
> private (and thus could break).
>
> You could use something like this to implement the same methods on
> multiple places (document, window, element):
>
> [Element, Window, Document].invoke('implement', {
>    // methods
> });
>
> This is a little trick which uses the Array:invoke method -
> http://mootools.net/docs/core/Types/Array#Array:invoke
>
>
>
> On Nov 28, 6:59 am, Sean McArthur <[email protected]> wrote:
> > Native was a private (undocumented) class from 1.2. It has been done away
> > with.
> >
> > The correct way to access implement is directly from each object, as
> you've
> > alluded to.
> >
> > I'm fairly certain that Document.implement is available as well. Is it
> not?
> > (Note, you might get an error from access Document in jsFiddle, since
> it's
> > run in an iframe trying to access the parent document.)
> >
> >
> >
> > On Sat, Nov 27, 2010 at 9:50 PM, Dailce <[email protected]> wrote:
> > > Well I did some changes and I think it's working properly.
> > > However, I don't really know why it's working now or if it correct/
> > > proper.
> >
> > > If you look athttp://jsfiddle.net/yU83v/
> >
> > > I changed Native.implement([Element], {
> > > TO:  Element.implement({
> >
> > > and
> >
> > > I changed Native.implement([Document, Window]
> > > TO:  Window.implement({
> > > But what happened to Document?
> >
> > > The class seems to be working fine now, I'd just like to know more
> > > about this stuff.
> > > Thanks.
>

Reply via email to