This code sample demonstrates how to take an existing interaction built with using a traditional jQuery approach and show how to refactor it to use the native selection API, then implemented as a native Web Component and finally as a Polymer.js component.
First, clone the repo:
git clone https://github.com/craigshoemaker/jquery-to-polymer
Then, change into the folder:
cd jquery-to-polymer
Next, install the dependencies:
npm install
Finally, run the application:
npm start
Note that the seed
branch features the same code as in the master
branch except the body of the JavaScript modules is removed. If you want to follow the course along from scratch, you can start with the seed
branch.