Skip to content

Commit

Permalink
firefox compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
bahrus committed Jan 5, 2018
1 parent dc92e7e commit 7e1a150
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ In a separate html, define an HTML template:
I am here
</template>
</dom-module>
<script type="module">
<script type="module" cc-head-element>
class MyComponent extends Polymer.Element{
static get is(){return 'my-component';}
}
Expand All @@ -83,6 +83,8 @@ Then in the referencing file, just add:

*et voilà!*

Note the presence of the cc-head-element attribute. Carbon copy looks for that attribute, and if present, moves the script tag to document.head. This is inspired by [this issue and suggestion from Polymer team](https://github.com/webcomponents/webcomponentsjs/issues/470), to be compatible with Firefox.

### Changing href

By default, if the href attribute / property changes for an existing c-c element instance, the new template will be appended to the inner content of the c-c element. Even if you go back to the original template, it will keep getting appended repeatedly.
Expand Down
1 change: 1 addition & 0 deletions build/ES5/carbon-copy.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build/ES6/carbon-copy.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7e1a150

Please sign in to comment.