1 | import { r as registerInstance, g as getElement } from './stencilrouter-1307249c.js';
|
2 | import { A as ActiveRouter } from './chunk-cfc6485e.js';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | class RouteTitle {
|
11 | constructor(hostRef) {
|
12 | registerInstance(this, hostRef);
|
13 | this.titleSuffix = '';
|
14 | this.pageTitle = '';
|
15 | }
|
16 | updateDocumentTitle() {
|
17 | const el = this.el;
|
18 | if (el.ownerDocument) {
|
19 | el.ownerDocument.title = `${this.pageTitle}${this.titleSuffix || ''}`;
|
20 | }
|
21 | }
|
22 | componentWillLoad() {
|
23 | this.updateDocumentTitle();
|
24 | }
|
25 | get el() { return getElement(this); }
|
26 | static get watchers() { return {
|
27 | "pageTitle": ["updateDocumentTitle"]
|
28 | }; }
|
29 | }
|
30 | ActiveRouter.injectProps(RouteTitle, [
|
31 | 'titleSuffix',
|
32 | ]);
|
33 |
|
34 | export { RouteTitle as stencil_route_title };
|