tannhu/jsface — Issue #2: issue Mixin with instance and Mixin with native classes
Author: luakri
Created: 2012-01-16 20:55:09+00:00
State: open

hello Tannhu

i have tested the new files from git, and regarding the issue of ie7 and ie8 the page of unit tests displays no errors. my congrats.

thank for your work fixing the issue. once again my congrats for such a helpful library.

i have a file with your implementations of the api, the examples from the github and i have 2 issues

in all browsers

Mixin with instance:

var person = new Person("Rika", 20);

extend(person, Options);

console.log(person);

/* - inspecting in console
age 20
name "Rika"
$super function()
toString function()
*/

person.setOptions({ foo: true });

gives this error:

person.setOptions is not a function
person.setOptions({ foo: true });

it appears that extends is not working, since it has no prop from the options class

another issue but only in ie7, ie8, works in ie9, ff, chrome, safari

regarding

Mixin with native classes:

extend(Array.prototype, {
trim: function() {
return this.replace(/^\s+|\s+$/g, "");
}
});

" Hello World ".trim(); // "Hello World"

in ie7 and ie8

SCRIPT438: Object doesn't support property or method 'trim'

thank you very much