[ 6 posts ]

Walter Rumsby

YUI Contributor

  • Username: wrumsby
  • Joined: Tue Feb 10, 2009 1:11 pm
  • Posts: 18
  • Location: Auckland, New Zealand
  • Twitter: wrumsby
  • GitHub: wrumsby
  • Gists: wrumsby
  • Offline
  • Profile

Y.Node.create + HTML5 Shiv + IE < 9 === :(

Post Posted: Mon Jan 31, 2011 11:18 pm
+0-
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.

Matt Sweeney

YUI Developer

  • YUI Developer
  • Offline
  • Profile

Re: Y.Node.create + HTML5 Shiv + IE < 9 === :(

Post Posted: Tue Feb 01, 2011 10:16 am
+0-
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.

Cheston

YUI Contributor

  • Username: chestone
  • Joined: Thu Jan 06, 2011 1:18 pm
  • Posts: 1
  • GitHub: chestone
  • Gists: chestone
  • IRC: chestone
  • Offline
  • Profile

Re: Y.Node.create + HTML5 Shiv + IE < 9 === :(

Post Posted: Wed Apr 06, 2011 4:51 pm
+0-
Any status on your experimentation with this? I've run into this issue and hate to have to revert back to divs.

Walter Rumsby

YUI Contributor

  • Username: wrumsby
  • Joined: Tue Feb 10, 2009 1:11 pm
  • Posts: 18
  • Location: Auckland, New Zealand
  • Twitter: wrumsby
  • GitHub: wrumsby
  • Gists: wrumsby
  • Offline
  • Profile

Re: Y.Node.create + HTML5 Shiv + IE < 9 === :(

Post Posted: Thu Aug 04, 2011 2:14 am
+0-
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 Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 620
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile

Re: Y.Node.create + HTML5 Shiv + IE < 9 === :(

Post Posted: Thu Aug 04, 2011 5:20 am
+0-
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 Cavanaugh

YUI Contributor

  • Offline
  • Profile
Tags:

Re: Y.Node.create + HTML5 Shiv + IE < 9 === :(

Post Posted: Thu Aug 25, 2011 9:32 pm
+0-
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 :)
  [ 6 posts ]
Display posts from previous:  Sort by  
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