forked from mirror/Part-DB.Part-DB-server
12 lines
No EOL
343 B
JavaScript
12 lines
No EOL
343 B
JavaScript
import { Controller } from '@hotwired/stimulus';
|
|
|
|
export default class extends Controller {
|
|
connect() {
|
|
//If we encounter an element with this, then change the title of our document according to data-title
|
|
this.changeTitle(this.element.dataset.title);
|
|
}
|
|
|
|
changeTitle(title) {
|
|
document.title = title;
|
|
}
|
|
} |