Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


IE7/8 getProperty returns functions #2109

bastianschilbe opened this Issue · 8 comments

4 participants

bastianschilbe Olmo Maldonado Arian Stolwijk Fabio M. Costa


FF/Safari/IE9 return

IE7/8 return
function(el, where){
inserterswhere || 'bottom';
return this;

Element methods seem to be returned.

Arian Stolwijk arian was assigned
Olmo Maldonado

Yeah.. this is also for IE6. Here's a fiddle:

Olmo Maldonado

Here we go:

@fabiomcosta @SubtleGradient, this is a tough one ... should Slick.getAttribute fix this?

Olmo Maldonado

Actually, this might be mootools related. @arian @cpojer help :D

Olmo Maldonado

Still waiting on input from @fabiomcosta, @subtleGradient, @arian, @cpojer. Looking for opinions/direction or 2c. Thanks!

Arian Stolwijk

I don't know, it's unwanted behaviour to me. If it's indeed Slick.getAttribute then it should be fixed there, I wouldn't know how though..

Fabio M. Costa

It's not Slick... It's how the elements are extended on IE by Mootools and the way that expandos are threated as attributes on IE. I don't agree we should fix it there since Slick is intended to be used anywhere, by any framework, and should not have anything related to mootools-core inside it.


Arian Stolwijk
Olmo Maldonado

The problem is that

el.anything will be considered an attribute by IE. This means that el.getAttribute('anything') will give the value of it.

One solution is to whitelist using setProperty any attributes and check against the property in getProperty if someone wants el.something they should use el.something. Again, this reinforces that = 'set the value' is very bad.

Olmo Maldonado ibolmo referenced this issue from a commit in ibolmo/mootools-core
Olmo Maldonado ibolmo Fixes #2109.
IE < 9, getAttribute returns properties set via `el.attribute = value`.
Other browsers return null for such properties that are not part of the
specs (e.g. `href`, `width`, or `title`).

This tries to normalize the behavior and prevents unwanted "expando"
properties from being returned (e.g. `inject` and other Element

TL;DR: whitelist any setProperty, and getProperty checks in the
whitelist or if the attribute is an expando (not part of the known

Fixed a spec with maxlenght property, when it needed to be maxlength.

PASSED: IE6-9; FFx 3-5, 8, 10, Opera 11, Chrome latest, Safari 5
Olmo Maldonado ibolmo referenced this issue

Fixes #2109. #2167

Olmo Maldonado ibolmo referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
Olmo Maldonado ibolmo closed this in 70b402e
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.