@motorcycle/mostly-html
Version:
Server-side rendering for Motorcycle.ts
24 lines • 876 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var stream_1 = require("@motorcycle/stream");
var ROOT_SELECTOR = ':root';
var HtmlDomSource = /** @class */ (function () {
function HtmlDomSource(cssSelectors) {
this.cssSelectors = function () { return cssSelectors; };
}
HtmlDomSource.prototype.query = function (cssSelector) {
var trimmedSelector = cssSelector.trim();
return trimmedSelector === ROOT_SELECTOR
? this
: new HtmlDomSource(this.cssSelectors().concat(trimmedSelector));
};
HtmlDomSource.prototype.events = function () {
return stream_1.empty();
};
HtmlDomSource.prototype.elements = function () {
return stream_1.empty();
};
return HtmlDomSource;
}());
exports.HtmlDomSource = HtmlDomSource;
//# sourceMappingURL=HtmlDomSource.js.map