Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I recover the contaminated DOM? #1779

Closed
w88975 opened this issue Jun 8, 2015 · 2 comments
Closed

Can I recover the contaminated DOM? #1779

w88975 opened this issue Jun 8, 2015 · 2 comments

Comments

@w88975
Copy link

w88975 commented Jun 8, 2015

i create a polymer dom like:

<dom-module id="editor-button" >
    <link rel="import" type="css" href="button.css">

    <template>
        <div class="btn">
            <content></content>
        </div>
    </template>

    <script type="text/javascript" src="button.js"></script>
</dom-module>

when I append to the HTML dom,like this code:

<div>
    <editor-button>button</editor-button>
<div>

i got this div's innerHTML,the result is:

 <editor-button class="style-scope ui-kit-preview-button" tabindex="0">
        <div class="btn style-scope editor-button">
                 button
        </div>
 </editor-button>

i want to get the innerHTML like:

<editor-button>button</editor-button>

not has been contaminated dom.

what should i do?

thanks~~

@w88975 w88975 changed the title Can you recover the contaminated DOM? Can I recover the contaminated DOM? Jun 8, 2015
@kevinpschaaf
Copy link
Member

Polymer.dom(node).innerHTML

See https://www.polymer-project.org/1.0/docs/devguide/local-dom.html#dom-api

@w88975
Copy link
Author

w88975 commented Jun 9, 2015

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants