(available at app-decorators >= v1.0)
app-decorators >=0.3
src/libs/customelement.js
babel src/libs/customelement.js --out-file dist/component.js --modules common --stage 0
make build module=amd // for using with requirejs // or make build module=common // for using with node
var CustomElement = require('src/libs/customelement'); function Item(){} Item.prototype.a = function(){}; Item.prototype.b = function(){}; Item.prototype.c = function(){}; Item.prototype.created = function() {} Item.prototype.attached = function() {} Item.prototype.attributeChanged = function(attrName, oldVal, newVal) {} Item.prototype.detached = function() {} CustomElement.register(Item, HTMLElement); var item = Item.create(); document.body.appendChild(item);
There was an error while loading. Please reload this page.