app-decorators-element-to-function
v0.8.252
Published
babel plugin for app-decorators to extends an HTMLElement in IE and Safari
Downloads
2
Readme
app-decorators-element-to-function
Installation
$ npm install app-decorators-element-to-function --save
Usage
The goal of this babel-plugin is for app-decorators @component:
see: https://github.com/babel/babel/issues/1548
app-decorators-element-to-function.js:
let elementToFunction = Element => {
if(typeof Element === 'function'){
return Element;
}
let _Element = function(){};
_Element.prototype = Element.prototype;
return _Element;
};
import ElementToFunc from 'app-decorators-element-to-function';
class Foo extends ElementToFunc(HTMLImageElement) {
}