argelius / favorite-star

Simple Web Components that displays a clickable "favorite star"
MIT License
11 stars 2 forks source link

Errors on 8 and 53 #1

Open adamcweitzman opened 8 years ago

adamcweitzman commented 8 years ago

Hey,

So i just tried using the code in a node app, I get errors on lines 8 and 53..

1) Uncaught TypeError: Cannot read property 'content' of null @ favorite-star.js:8 2) favorite-star.js:53 Uncaught TypeError: Cannot read property 'addEventListener' of undefined

maybe I'm doing something wrong?

argelius commented 8 years ago

Hi @adamcweitzman ! This component is only usable in the browser. Just include it like this:

<link rel="import" href="path/to/favorite-star.html">

However you probably need the Web Components polyfill as well to make it work: http://webcomponents.org/