addyosmani/componentized-todo — pull request #1 by geelen (2014-07-24 04:04:22+00:00)
Title: Using platform.js to get this working on Firefox

I had to make some compromises - `document.querySelector('#template')` within the component definitions was returning `null`. In Chrome it appears that calling the IIFE with `document.currentScript.ownerDocument` gives you the right (isolated) context, but in Firefox w/ platform.js that is returning the main `document` for `index.html`, which doesn't have a `#template` element, and it returns null. So instead of fighting with something I didn't understand, I decided to move the templates into `index.html`, change the IIFE invocation to simply `document` and see what happened. And it worked :bangbang: :sunglasses:

This sort of stuff is _really_ exciting to me. It was only when I realised that Polymer and Platform were different and might be able to used separately, and the pace at which native implementations have reached Chrome, that I started to think that we could do 'raw' Web Components cross-browser, now. Which I would like very much for x-gif :)

One final thought, how easy would it be to detect native support for the Web Components features in the browser and conditionally load `platform.js`?

Thanks for putting this example together!