@cycle/html
Version:
A driver for HTML strings based on Snabbdom and the DOM driver
30 lines • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var xstream_1 = require("xstream");
var adapt_1 = require("@cycle/run/lib/adapt");
var HTMLSource = /** @class */ (function () {
function HTMLSource(html$, _name) {
this._name = _name;
this._html$ = html$;
this._empty$ = adapt_1.adapt(xstream_1.default.empty());
}
HTMLSource.prototype.elements = function () {
var out = adapt_1.adapt(this._html$);
out._isCycleSource = this._name;
return out;
};
HTMLSource.prototype.element = function () {
return this.elements();
};
HTMLSource.prototype.select = function (selector) {
return new HTMLSource(xstream_1.default.empty(), this._name);
};
HTMLSource.prototype.events = function (eventType, options) {
var out = this._empty$;
out._isCycleSource = this._name;
return out;
};
return HTMLSource;
}());
exports.HTMLSource = HTMLSource;
//# sourceMappingURL=HTMLSource.js.map