custom web component for setting and printing properties
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bower_components
LICENSE
README.Native.md
README.md
bower.json
index.html
index.native.html
k-get.html
k-native-get-set.html
k-set.html

README.md

custom-element-get-and-set

Note: this is the README for the Polymer version, click for the native README version

custom web component for setting and printing properties

<k-set> accepts 3 attributes: property, value, target

property: the name of the property to be setted

value: the value of the property

target: parent | global | Polymer where to store the property. default to Polymer if omitted

parent: will store the property on the parent element

global: will store the property on the global object (window)

Polymer: will store the property on the Polymer object

<k-get> accepts 2 attributes: property, source

property: the name of the property to print

source: scoped | parent | global | Polymer the source where to read the property. default to Polymer if omitted

scoped: try to look if the property is on the parent, if not look on the parent's parent and so on, if not found try looking in Polymer first and global as last.

parent: look on the parent node

global: look on the global object (window)

Polymer: look on the Polymer object

DEMO