Code coverage report for lib/element.js

Statements: 84.62% (22 / 26)      Branches: 100% (0 / 0)      Functions: 71.43% (5 / 7)      Lines: 84.62% (22 / 26)      Ignored: none     

All files » lib/ » element.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77          1   1   1   1   1   5 5 5 2   2 2 2   2           1   1   1                                 1 1   1                     1     1             1  
/* global document */
 
/** @constructor */
'use strict';
 
var _get = require('babel-runtime/helpers/get')['default'];
 
var _inherits = require('babel-runtime/helpers/inherits')['default'];
 
var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default'];
 
var _Object$keys = require('babel-runtime/core-js/object/keys')['default'];
 
var Element = /** @function 
              * @param element */function Element(element) {
    this[0] = element;
    element.$elt = this;
    element.addEventListener('dispose', ( /** @function */function () {
        setTimeout(( /** @function */function () {
            // allow other dispose event listeners
            this[0].$elt = undefined; // ie does not allow deletion of properties on elements.
            delete this[0].$elt;
            _Object$keys(this).forEach(( /** @function 
                                         * @param key */function (key) {
                delete this[key];
            }).bind(this));
        }).bind(this), 1);
    }).bind(this), false);
};
 
module.exports = Element;
 
var elements = require('./elements');
 
Element.prototype = {
 
    /**
     * Set value
     *
     * @param {string} value
     * @return {Element}
     */
    setValue: /** @function 
              * @param value */function setValue(value) {
        elements.setValue(this[0], value);
        return this;
    }
};
 
/** @class ElementBasic 
* @param tagName */
var ElementBasic = (function (_Element) {
    _inherits(ElementBasic, _Element);
 
    function ElementBasic(tagName) {
        _classCallCheck(this, ElementBasic);
 
        _get(Object.getPrototypeOf(ElementBasic.prototype), 'constructor', this).call(this, document.createElement(tagName));
    }
 
    /**
     * @constructor
     * @augments {Element}
     * @param {string} tagName
     */
    return ElementBasic;
})(Element);
 
Element.Basic = ElementBasic;
 
/**
 * @constructor
 * @augments {Element}
 * @param {string} tagName
 */
Element.WithContent = Element.Basic;
//# sourceMappingURL=element.js.map