Skip to content
 
 

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

misbehave

Turn Polymer v1 components into behaviors

Usage

Misbehave adds a method element.toBehavior() to all Polymer components which exports a behavior definition that can be used to effectively extend a component. The misbehave library should be included as an HTML import after Polymer.

<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../misbehave/misbehave.html">
<link rel="import" href="base-component.html">

<script>

  Polymer({

    is: 'ext-component',

    // ext-component now effectively extends the Polymer component base-component
    behaviors: [
      document.createElement('base-component').toBehavior()
    ]

  });

</script>

About

Turn Polymer v1 components into behaviors

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages