How to import kernel elements and paper elements in JSFiddle

How can I import basic elements and paper elements into JSFiddle .

I import polymer through these statements:

<script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.4.2/platform.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.4.2/polymer.js"></script> 

How to import, for example, core-input or paper-input ?

+5
source share
3 answers

Yes, from the site of the irrigation project, or I think your cdn for cloud computing, if you know the location

 <script src="http://www.polymer-project.org/platform.js"></script> <link rel="import" href="http://www.polymer-project.org/components/polymer/polymer.html"> <link rel="import" href="http://www.polymer-project.org/components/paper-button/paper-button.html"> <link rel="import" href="http://www.polymer-project.org/components/core-header-panel/core-header-panel.html"> 

It is just for developers, not for production.

If you received polymer elements , then select your element and click the button that says Get Element, this will give you a pop-up window with a link to import.

You can also get a link for all basic or paper elements here.

+8
source

A good alternative is still work in progress - https://ele.io/

Ele (call it "Ellie") is a simplified environment for exploring, experimenting, and sharing custom HTML elements that are reused with web components.

+4
source

To test a simple component written in Polymer 1.0, I use this snippet:

 <link rel="import" href="https://raw.githubusercontent.com/Polymer/polymer/master/polymer.html"> <dom-module id="proto-element"> <template> <span>I'm <b>proto-element</b>. Check out my prototype.</span> </template> </dom-module> <script> Polymer({ is: "proto-element", ready: function() { //... } }); </script> <proto-element></proto-element> 

http://jsfiddle.net/MartyIX/84b5sabw/

0
source

Source: https://habr.com/ru/post/1205850/


All Articles