Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bower + WebComponents

Bower + WebComponents

WebComponentsのパッケージ化について。。。

mex-ichikawa

October 24, 2014
Tweet

More Decks by mex-ichikawa

Other Decks in Programming

Transcript

  1. • Component - https://github.com/componentjs/component • Bower - http://bower.io/ • RequireJS

    - http://requirejs.org/ • Browserify - http://browserify.org/
  2. • Component - https://github.com/componentjs/component • Bower - http://bower.io/ • RequireJS

    - http://requirejs.org/ • Browserify - http://browserify.org/
  3. createdCallback: { value: function(){ var shadowRoot = this.createShadowRoot(); var template

    = document.querySelector('#nameOfTemplate'); shadowRoot.appendChild(template.content.cloneNode(true)); } }
  4. //global var currentDocument = document.currentScript.ownerDocument; ... createdCallback: { value: function(){

    var shadowRoot = this.createShadowRoot(); var template = currentDocument.querySelector('#nameOfTemplate'); shadowRoot.appendChild(template.content.cloneNode(true)); } }