molily: extend Canvas-Framwork-prototype mit CRC2D-props/meths

Beitrag lesen

Wenn ich aber statt this.ctxm this.ctx[m].apply(this,arguments)
schreibe, bekomme ich oben genannte Fehlermeldung in der firebug-Konsole:
Illegal operation on WrappedNative prototype object

Der Fehler ist eigentlich zu erwarten, schließlich wird eine Methode des Canvas-Kontexts auf mit deiner Instanz als this aufgerufen. Das habe ich falsch gemacht, es müsste eher so lauten:

this.ctx[m].apply(this.ctx, arguments)

Das wäre dann äquivalent zu

this.ctx[m](a, b, c, d, usw.)

Mathias