Sweet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello World |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<style> | |
what-goes-here /content/ *:not([top]) [text] { | |
color: transparent; | |
} | |
</style> |
As I understand it, the original Custom Elements
concept had a crystalline form: attach a class to a tag-name.
Using the yet-to-be ES6 syntax, it would look something like this:
class MyElement extends HTMLElement {
constructor() {
}
doStuff() {
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loadLinks: function(urls, callback) { | |
var doc = document.createDocumentFragment(); | |
urls.forEach(function(url) { | |
var link = doc.appendChild(document.createElement('link')); | |
link.rel = "import"; | |
link.href = url; | |
}); | |
// load-all-links in document method should be factored somewhere | |
// very similar method used in x-meta | |
HTMLImports.importer.load(doc, function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
E:\www\bowertopia>bower install Polymer/polmer-elements#master | |
bower polmer-elements#master not-cached git://github.com/Polymer/polmer-elements.git#master | |
bower polmer-elements#master resolve git://github.com/Polymer/polmer-elements.git#master | |
bower platform#master cached git://github.com/Polymer/platform.git#2b99a84638 | |
bower platform#master validate 2b99a84638 against git://github.com/Polymer/platform.git#master | |
bower polmer-elements#master ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/Polymer/p | |
olmer-elements.git", exit code of #128 | |
Additional error details: | |
fatal: remote error: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
explodeObservers: function(prototype) { | |
// called before prototype.observe is chained to inherited object | |
var o = prototype.observe; | |
if (o) { | |
var exploded = {}; | |
for (var n in o) { | |
var names = n.split(' '); | |
for (var i=0, ni; ni=names[i]; i++) { | |
exploded[ni] = o[n]; | |
} |