Giter VIP home page Giter VIP logo

tips's Introduction

Polymer Tips

Debugging

1. Data binding

Two-way data binding problems?

  • For <my-element foo={{bar}}> make sure foo is a notifying property! ➡️ notify: true

Binding to a dataset attribute not working?

  • Make sure you're using $= attribute binding! ➡️ <button data-index$=[[bar]]>

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

tips's People

Contributors

josefjezek avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.