Microdata-JS
Microdata-JS copied to clipboard
Being shim agnostic
It would be nice if it could be documented what you need to emulate for full support here.
For example would it work in IE8+ if you threw the DOM-shim in? If not what is missing?
We really need a better way of documenting what DOM features need to be shimmed rather then saying "using this specific shim"
I am thinking about it. I need to learn documentation markup
I just finished feature. This will allow you to define what features are needed. Something like
if (window.features && [
"DOM.Element.getAttribute",
"DOM.Document.createElement",
...
].every(function (n) { return window.features[n]; })) {
/* run shim code as all the features necessary are present */
}
If you don't want to add it to the code you can add it in the documentation and reference feature.
Great work!
I'll add Microdata items in features, after I'll get some rest.
Note: for now, this lib incompatible with you shim, only because of require of DOMSettableList object ( or rather because of my implimentation of this interface ).
I am think about replacement native implementation for allow developer create instances of this class. Is this a bad idea?
If there is no good alternative then it's a good idea. I need to do my own research to tell whether there are alternatives.