leonidas / transparency

Transparency is a semantic template engine for the browser. It maps JSON objects to DOM elements by id, class and data-bind attributes.
http://leonidas.github.com/transparency/
MIT License
969 stars 112 forks source link

IE8 transparency="" attribute #77

Closed miohtama closed 12 years ago

miohtama commented 12 years ago

Just noticed this when debugging a site with it:

http://imgur.com/fXxA6

Looks like transparency="" attribute is set on DOM nodes. The site is working. But I am not sure whether it should like that as it says <div transparency="[Object object]">

pyykkis commented 12 years ago

This is actually a "feature" in IE8 and below. Transparency sets an expando transparency on DOM nodes, but old IEs copy all properties to attributes. So, in old IE, element['transparency'] === element.getAttribute('transparency').

In IE8 console, that's shown as <div transparency="[Object object]">, as you noted. A bit disturbing, but harmless :)