1

The polymer app that is generated when "JavaScript Polymer custom element" is selected as the project type in Chrome Dev Editor's "New Project" dialog displays a blank screen when run.

Is this a bug or am I doing something wrong?

If it is a bug, then how would I get the polymer app to display something?

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
Peter
  • 1,720
  • 3
  • 18
  • 30

4 Answers4

0

Judging by your description, it sounds like you are forgetting to refactor for CSP. Right click on your project name, and select Refactor for CSP. This will take a while, but when it's done, it will work.

Ethan McTague
  • 2,236
  • 3
  • 21
  • 53
0

Sorry for the delayed response.

  1. Please try the up-to-date Chrome Dev Editor. It's possible that the mentioned template was broken and got fixed since you've submitted the question.
  2. Also make sure that you either:
    • have index.html or demo.html selected when clicking the Run button; or
    • right-click on of them and select Run... from the context menu.

What might have happened is that you confused Polymer element with a Polymer app. The template that've you used generates an element. It also provides an example of the element's usage in form of demo.html, and a standard Polymer element description page (based on the core-component-page element that reads and displays elements properties from the metadata.html) in form of index.html. So you have to explicitly run one of those to see something. If you attempt to "run" the element itself (say, click the Run button with my-element.html selected), you will see a blank screen, just like with any other pure Polymer template, because there is no renderable HTML in there (it's called a template for a reason).

If you do indeed want a Polymer app, consider using JavaScript web app (using Polymer paper elements) or JavaScript Chrome app (using Polymer paper elements) project types.

Sergey Shevchenko
  • 1,750
  • 14
  • 13
0

Try at first, to run the bower update from your command line

 bower install Polymer/core-elements --save

And you might also need to right click on your project directory from the right panel of chrome dev editor and select Refractor for CSP.

0

Possibly in the example app, the CDE project (bower.json level) was in a subdirectory of the directory that you imported into the editor. Try to import a level deeper instead.

pjv
  • 10,658
  • 6
  • 43
  • 60