UNPKG

@cycle/html

Version:

A driver for HTML strings based on Snabbdom and the DOM driver

28 lines 881 B
import xs from 'xstream'; import { adapt } from '@cycle/run/lib/adapt'; var HTMLSource = /** @class */ (function () { function HTMLSource(html$, _name) { this._name = _name; this._html$ = html$; this._empty$ = adapt(xs.empty()); } HTMLSource.prototype.elements = function () { var out = adapt(this._html$); out._isCycleSource = this._name; return out; }; HTMLSource.prototype.element = function () { return this.elements(); }; HTMLSource.prototype.select = function (selector) { return new HTMLSource(xs.empty(), this._name); }; HTMLSource.prototype.events = function (eventType, options) { var out = this._empty$; out._isCycleSource = this._name; return out; }; return HTMLSource; }()); export { HTMLSource }; //# sourceMappingURL=HTMLSource.js.map