Doc: Integrating the Custom Element and Shadow DOM polyfill

81 views
Skip to first unread message

Eric Bidelman

unread,
Apr 1, 2013, 4:06:20 PM4/1/13
to toolkitchen
For anyone interested, we posted a document on integrating the Custom Element polyfill and the Shadow DOM polyfill. Thanks Scott.

It's up on the wiki for CustomElements:
https://github.com/toolkitchen/CustomElements/wiki/Integrating-Custom-Element-and-Shadow-DOM-Polyfills

Hopefully we'll have a few more of these "design decision" documents int the future.

Eric


mr....@gmail.com

unread,
Jan 25, 2014, 3:28:08 AM1/25/14
to polym...@googlegroups.com, toolkitchen
That was interesting and insightful, however I'm running intro troubles using the two polyfills together.

I'd like to stick closely to the standard implementations and use

var proto=Object.create(HTMLElement.prototype)
then register my custom element with that prototype and in the createdCallback create a shadow root.

This, unluckily, gives me

"TypeError: Cannot read property 'ownerDocument' of undefined
because hostWrapper.impl is undefined. :( 

Scott Miles

unread,
Jan 25, 2014, 3:55:00 AM1/25/14
to mr....@gmail.com, polymer-dev, toolkitchen
Do you mean something like this?



Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/96dc1fbd-a433-4ef9-a6f2-a3eaa56a9f6a%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Martin N.

unread,
Jan 25, 2014, 6:16:03 AM1/25/14
to Scott Miles, polymer-dev, toolkitchen
Thanks Scott,

that is indeed helpful. For those who experience trouble with using the different polyfills together, this is helpful: 


2014/1/25 Scott Miles <sjm...@google.com>
Reply all
Reply to author
Forward
0 new messages