https://github.com/startpolymer/tips
Polymer Tips
https://github.com/startpolymer/tips
Last synced: 5 months ago
JSON representation
Polymer Tips
- Host: GitHub
- URL: https://github.com/startpolymer/tips
- Owner: StartPolymer
- Created: 2018-04-30T14:04:09.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-30T14:33:08.000Z (about 8 years ago)
- Last Synced: 2025-07-28T15:41:13.386Z (11 months ago)
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Polymer Tips
## Debugging
### 1. Data binding
#### Two-way data binding problems?
- For `` make sure `foo` is a notifying property! ➡️ `notify: true`
#### Binding to a dataset attribute not working?
- Make sure you're using `$=` attribute binding! ➡️ ``
### 2. Is your custom element firing an event but you can't seem to listen to it from the outside?
➡️ Make sure it's bubbling!
- `this.dispatchEvent(new CustomEvent('meow', {bubbles: true, composed: true}));`
### 3. Made a pretty 💣 element but can't see it on the page? 🙀
➡️ Check your superclass methods!
- call `super()` if you're in the constructor
- and `super.connectedCallback()` for the connected callback
- and don't forget about the tricky `super.ready()` too! Or nothing will happen.
---
### Resources
- [twitter.com/polymer](https://twitter.com/polymer)