polymer-svg-template

1.0.2 • Public • Published

Polymer SVG Template poly-fill

When defining a custom element in Polymer, <template> wouldn't work inside won't work, load this poly-fill before calling Polymer factory, shall fix it.

This should work with polymer 2.0 as well.

Usage

<link rel="import" href="../bower_components/polymer-svg-template/polymer-svg-template.html"/>
<dom-module id="my-svg-template">
    <template>
    	<svg>
    		<template is="dom-if" if="[[_condition]]">
    			...
    		</template>
    	</svg>
    </template>
</dom-module>
<script>
   //  Polyfill all <template>s inside of the containing svg element.
   PolymerSvgTemplate('my-svg-template');
	Polymer({
		is: 'my-svg-template'
		...
	})
</script>

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i polymer-svg-template

      Weekly Downloads

      0

      Version

      1.0.2

      License

      MIT

      Last publish

      Collaborators

      • garryyao