Multiple fixes to styles and polyfills

This commit is contained in:
Ludwig Schubert
2017-10-23 11:10:03 -07:00
parent 1a4cd694cd
commit c742b36be6
27 changed files with 339 additions and 151 deletions
+13 -1
View File
@@ -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');