Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

el.erase('class') does nothing in ie7 #2100

Closed
gehan opened this Issue · 1 comment

3 participants

@gehan

var e = new Element('div.test').inject(document.body);
console.log(e.get('class')); // 'test'
e.erase('class');
console.log(e.get('class')); // 'test' (in ie7), should return ''

@gehan

Sorry should return null, not ''. Correct behaviour in ie8, not sure about ie6.

@gehan gehan closed this
@gehan gehan reopened this
@arian arian was assigned
@ibolmo ibolmo referenced this issue from a commit in ibolmo/mootools-core
@ibolmo ibolmo Simpler fix for #2100.
Removed unnecessary Element.Properties.class and opted to use
propertySetter and getter. Adding for condition to set the value to ''
instead of null (IE would set to 'null').

Refactored setProperty. Now much simpler. Checks for propertySetter and
assumes it'll take responsibility in cleaning up the value (and to set
it). Still removeAttribute if no setter, and value is null. Passes all
specs, and therefore, it's backwards compatible.

PASSED: IE6-9, FFx 3-5, 8, 10, Chrome latest, Safari 5, Opera 11.
9726eff
@cpojer cpojer closed this in edb0324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.