Skip to content

Loading…

Expected behavior for importNode,cloneNode #1888

Closed
timeu opened this Issue · 4 comments

3 participants

@timeu

I am not sure if this is by design and/or if it is a Polymer or rather a general Web-Components spec issue.

When I use importNode or cloneNode with deep=true of a custom-element that contains another custom element (via Light DOM) and then insert it into the document, the resulting DOM structure is not the same as if I would create it manually.

See the jsbin: http://jsbin.com/haxeni/edit?html,console

@sorvell sorvell added the p2 label
@sorvell sorvell self-assigned this
@sorvell sorvell added p1 and removed p2 labels
@sorvell
Owner

Thanks for posting this. This is a known limitation that comes with using Shady DOM. We need to add support for importNode and cloneNode to the Polymer.dom api to address this. At that point, you'll use Polymer.dom(element).cloneNode and Polymer.dom(element).importNode.

@sorvell
Owner

Marking this high priority since we plan to add these api's very soon.

@timeu

Great thanks for the feedback.

@nomego

After further investigation, separate issue #2010 is opened.

@sorvell sorvell referenced this issue
Merged

Fixes #1888 #2051

@kevinpschaaf kevinpschaaf closed this in #2051
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.