3 ms·
Just wanted to point out that can.Component[1] is a custom element implementation that does support IE8. [1]http://canjs.com/docs/can.Component.html http://can
by MatthewPhillips 13y ago
Just wanted to point out that can.Component[1] is a custom element implementation that does support IE8.
[1]http://canjs.com/docs/can.Component.html http://canjs.com/docs/can.Component.html
- spankalee 13y agoUnless I'm reading something wrong, that doesn't look like W3C custom elements ( http://www.w3.org/TR/custom-elements/ http://www.w3.org/TR/custom-elements/ ), but CanJS's own system for recognizing custom tag names, like Angular directives. The docs even say "Currently, this only works within can.Mustache templates." W3C custom elements allow the browser to still parse the document, and when it encounters a tag that has been registered with document.register() it calls user code to create construct element. By having the browser be in charge of parsing and element construction, custom elements work without a framework, and when you modify the DOM via things like innerHtml. Approaches like Angular directives, and I'm guessing CanJS components, usually break down when the DOM is modified outside of certain blessed APIs.