[go: up one dir, main page]

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

In ploymer,the script is written in the component html,is there any method to set data-cover on the script #559

Open
flyHe opened this issue Mar 29, 2016 · 2 comments

Comments

@flyHe
Copy link
flyHe commented Mar 29, 2016

In Polymer,the script is written in a component html,like:

<link rel="import"
      href="bower_components/polymer/polymer.html">

<dom-module id="dom-element">

  <template>
    <p>I'm a DOM element. This is my local DOM!</p>
  </template>

  <script>
    Polymer({
      is: "dom-element"
    });
  </script>

</dom-module>

and the component can be used in page

<!DOCTYPE html>
<html>
  <head>
    <script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
    <link rel="import" href="dom-element.html">
  </head>
  <body>
    <dom-element></dom-element>
  </body>
</html>

How can I get the code coverage on the script in dom-element component

@alex-seville
Copy link
Owner

I think you'd have to instrument it as a build step before polymer transforms it into html

@flyHe
Copy link
Author
flyHe commented Mar 30, 2016

@alex-seville Thanks for your help.I instrument it when page starts,it works

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