mirror of
https://github.com/wassname/template.git
synced 2026-08-18 12:30:46 +08:00
Multiple fixes to styles and polyfills
This commit is contained in:
+13
-1
@@ -71,6 +71,7 @@ export const Controller = {
|
||||
},
|
||||
|
||||
onBibliographyChanged(event) {
|
||||
console.info('BibliographyChanged');
|
||||
const citationListTag = document.querySelector('d-citation-list');
|
||||
const bibliography = event.detail;
|
||||
|
||||
@@ -136,7 +137,12 @@ export const Controller = {
|
||||
},
|
||||
|
||||
DOMContentLoaded() {
|
||||
// console.debug('DOMContentLoaded.');
|
||||
if (Controller.loaded || ['interactive', 'complete'].indexOf(document.readyState) === -1) {
|
||||
return;
|
||||
} else {
|
||||
Controller.loaded = true;
|
||||
console.log('Controller running DOMContentLoaded')
|
||||
}
|
||||
|
||||
const frontMatterTag = document.querySelector('d-front-matter');
|
||||
const data = parseFrontmatter(frontMatterTag);
|
||||
@@ -149,6 +155,12 @@ export const Controller = {
|
||||
waitingCallback();
|
||||
}
|
||||
|
||||
if (frontMatter.bibliographyParsed) {
|
||||
for (const waitingCallback of Controller.waitingOn.bibliography.slice()) {
|
||||
waitingCallback();
|
||||
}
|
||||
}
|
||||
|
||||
const footnotesList = document.querySelector('d-footnote-list');
|
||||
if (footnotesList) {
|
||||
const footnotes = document.querySelectorAll('d-footnote');
|
||||
|
||||
Reference in New Issue
Block a user