Code coverage report for src/js/base/module/AutoSync.js

# all files / src/js/base/module/ AutoSync.js

92.86% Statements 13/14
100% Branches 0/0
83.33% Functions 5/6
92.31% Lines 12/13

    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
    261×
    1×
    1×

    1×
    2×
    97×
    97×
    97×

    1×
    99×

    1×

    1×

     (function(global){global.wrappers['/Users/lqez/Dev/summernote/src/js/base/module/AutoSync.js']=[function(require,module,exports,__dirname,__filename){ "use strict";
    exports.__esModule = true;
    var dom_1 = require("../core/dom");
    /**
     * textarea auto sync.
     */
    var AutoSync = /** @class */ (function () {
        function AutoSync(context) {
            var _this = this;
            this.$note = context.layoutInfo.note;
            this.events = {
                'summernote.change': function () {
                    _this.$note.val(context.invoke('code'));
                }
            };
        }
        AutoSync.prototype.shouldInitialize = function () {
            return dom_1["default"].isTextarea(this.$note[0]);
        };
        return AutoSync;
    }());
    exports["default"] = AutoSync;

    },'src/js/base/module/AutoSync.js',{"../core/dom":"/Users/lqez/Dev/summernote/src/js/base/core/dom.js"}];})(this);
    //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXV0b1N5bmMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJBdXRvU3luYy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLG1DQUE4QjtBQUU5Qjs7R0FFRztBQUNIO0lBQ0Usa0JBQVksT0FBTztRQUFuQixpQkFPQztRQU5DLElBQUksQ0FBQyxLQUFLLEdBQUcsT0FBTyxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUM7UUFDckMsSUFBSSxDQUFDLE1BQU0sR0FBRztZQUNaLG1CQUFtQixFQUFFO2dCQUNuQixLQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyx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