@web-atoms/core-docs
Version:
38 lines • 1.5 kB
JavaScript
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "./App", "./services/MockNavigationService", "./services/NavigationService"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MockApp = void 0;
const App_1 = require("./App");
const MockNavigationService_1 = require("./services/MockNavigationService");
const NavigationService_1 = require("./services/NavigationService");
class MockApp extends App_1.App {
constructor() {
super();
this.put(NavigationService_1.NavigationService, new MockNavigationService_1.MockNavigationService(this));
}
updateDefaultStyle(textContent) {
if (this.styleElement) {
if (this.styleElement.textContent === textContent) {
return;
}
}
const ss = document.createElement("style");
ss.textContent = textContent;
if (this.styleElement) {
this.styleElement.remove();
}
document.head.appendChild(ss);
this.styleElement = ss;
}
}
exports.MockApp = MockApp;
});
//# sourceMappingURL=MockApp.js.map