2015-12-03 14 views

risposta

10

Sì, è possibile, grazie a polygit.

Ecco un esempio di testo standard si possono sborsare: https://jsfiddle.net/kaycebasques/2q3fqehz/

HTML:

<base href="https://polygit.org/components/"> 
<script src="webcomponentsjs/webcomponents-lite.min.js"></script> 
<link href="polymer/polymer.html" rel="import"> 

<dom-module id="x-example"> 
    <template> 
    <style> 
     :host { 
     display: block; 
     } 
    </style> 
    <h1>polyfiddle</h1> 
    </template> 
</dom-module> 

<x-example></x-example> 

JS:

// only need this when in the main document and on non-Chrome 
addEventListener('WebComponentsReady', function() { 
    Polymer({ 
    is: 'x-example' 
    }); 
}); 
+1

Usa '' come base per puntare al master! :) –

+0

Il jsfiddle non funziona per me. Ottengo ERR_CONNECTION_REFUSED quando tenta di ottenere i file – Gilberg

+0

@Gilberg funziona ora ... So che i manutentori di [polygit] (https://github.com/PolymerLabs/polygit) hanno lavorato sulla sua infrastruttura che ha ha causato problemi nell'ultimo paio di settimane e spiegherebbe perché stavi vedendo quell'errore. –