| Page 1 of 1 | [ 6 posts ] |
|
As demonstrated in this JsFiddle it looks like Y.Node.create has some sort of white list that it uses when creating Nodes so that it only creates Nodes that the user agent knows about.
This has the unfortunate side-effect that while an HTML5 Shiv like that used in Modernizr allows you to create HTML5 elements in IE 6, 7, 8 via document.createElement you can't use Y.Node to create such elements in these browsers. |
|
Hi Walter,
There is no whitelist for Element creation in Node, but it does use innerHTML, which Modernizr doesn't support for IE unless the element is already in the DOM. I'm experimenting with a solution that will make this work transparently for 3.4.0. Modernizr is not needed to support your second example. If the custom element is created dynamically it behaves as expected. |
|
Any status on your experimentation with this? I've run into this issue and hate to have to revert back to divs.
|
|
Hey Matt,
An FYI in case you didn't know about this - there's a similar jQuery issue which discusses their ideas on how to solve this issue. http://bugs.jquery.com/ticket/6485 |
Juan Ignacio DopazoYUI Contributor
|
The guys at Alloy seem to have made an html5 shiv gallery module http://yuilibrary.com/gallery/show/aui-node-html5. Have you tried it?
|
Nate CavanaughYUI Contributor
|
Hi Walter,
I would recommend checking out our gallery node (or for the very latest, check out https://github.com/liferay/alloy-ui/blo ... e-html5.js Basically, the idea is, shim a DocumentFragment to accept HTML5 elements, then patch the DOM. _create method to basically run the newly created document fragment through (this seems to upgrade the new document fragment) and set the innerHTML of the new document fragment to the content. The sum of it is basically patching DOM._create to pipe the fragments and content through an already shimmed frag. I hope that all makes sense Of course, let me know if you have any questions |
| Page 1 of 1 | [ 6 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group