ponepaste/js/main.js
2021-08-25 20:02:05 -04:00

14 lines
344 B
JavaScript

import { $$ } from './dom';
import { TagsInput } from "./tag_input";
const setupSite = function() {
Array.prototype.forEach.call($$('.js-tag-input'), (el) => {
new TagsInput(el).attach();
});
};
if (document.readyState !== 'loading') {
setupSite();
} else {
document.addEventListener('DOMContentLoaded', setupSite);
}