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

Blank screen and no error if custom element is not registered #705

Closed
lavelle opened this issue Aug 13, 2014 · 4 comments
Closed

Blank screen and no error if custom element is not registered #705

lavelle opened this issue Aug 13, 2014 · 4 comments

Comments

@lavelle
Copy link

lavelle commented Aug 13, 2014

Creating a new element

<polymer-element name="my-foo"></polymer-element>

without declaring it with

Polymer('my-foo', {});

causes the entire page to fail to render. No errors are displayed in the console, and while the correct DOM tree is present, nothing is visible. Native elements like div and h1 have the correct dimensions and position, when highlighted with the Chrome inspector, whereas all custom elements have height and width zero, regardless of their styling.

Ideally, other elements on the page should be immune to this, leaving only the undefined element unrendered. At the very least, however, an error should be logged to the console warning that a custom element has been declared in the HTML but not registered in JS.

@lavelle
Copy link
Author

lavelle commented Aug 13, 2014

cc @jmuk

@frankiefu frankiefu assigned sorvell and unassigned sjmiles Aug 13, 2014
@sorvell sorvell added the p1 label Aug 15, 2014
@sorvell
Copy link
Contributor

sorvell commented Aug 15, 2014

@sorvell
Copy link
Contributor

sorvell commented Sep 18, 2014

We've added a couple basic tools that can help debug this situation. This is not enough, but it can help. The current plan is to integrate these low level tools into the Polymer dev tools extension to enable convenient debugging.

Polymer.waitingFor() returns the list of elements that polymer is waiting for before registering a set of definitions.

Polymer.forceReady(timeout) force polymer to register whatever it can register after an optional timeout in milliseconds.

@sorvell sorvell added p2 and removed p1 labels Nov 6, 2014
@tjsavage tjsavage added the 0.5 label May 21, 2015
@sorvell sorvell removed the p2 label Jun 12, 2015
@tjsavage
Copy link
Contributor

Closing this issue due to age and the release of version 1 of Polymer - please feel free to re-open if this is incorrect.

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

No branches or pull requests

4 participants