Skip to content

Instantly share code, notes, and snippets.

@fchristant
fchristant / scaffold.mjs
Created September 6, 2019 13:16
scaffold.mjs
import component from '../system/component.parent.mjs';
class scaffold extends component {
constructor(selector) {
super(selector);
// DOM element representing the message panel
this._panel = this.dom.querySelector("[data-panel]");
@fchristant
fchristant / scaffold.html
Last active September 6, 2019 12:50
scaffold.html
<div data-component data-component-module="scaffold" data-component-init data-component-id="scaffold1" data-name="Alpha" class="c_scaffold f_row--2">
<textarea data-panel="" rows="10"></textarea>
</div>
@fchristant
fchristant / dragon.components.instances.js
Last active May 11, 2020 19:04
dragon.components.instances.js
dragon.components.header.instances.globalheader.hide();
@fchristant
fchristant / dragon.component.mount.js
Last active May 11, 2020 19:03
dragon.component.mount.js
dragon.component.mount(window.document.body).then(() =>{
console.log('mounted!');
});
@fchristant
fchristant / dragon.component.create.js
Last active May 11, 2020 19:02
dragon.component.create.js
let header = document.getElementById("header");
dragon.component.create(header).then(component => {
console.log(component);
});
@fchristant
fchristant / dragon.module.load.js
Last active September 3, 2019 18:43
dragon.module.load
dragon.module.load("test").then(module => {
console.log(module.hello);
});
@fchristant
fchristant / dragon.script.load.js
Last active September 3, 2019 18:42
dragon.script.load()
dragon.script.load("https://code.jquery.com/jquery-3.4.1.min.js").then(() =>{
$( document ).ready(function() {
console.log($(document));
});
});
@fchristant
fchristant / dragon.ready.js
Last active May 11, 2020 18:58
dragon.ready()
window.addEventListener('🐉',() => {
console.log(dragon);
});
@fchristant
fchristant / component.html
Created August 24, 2019 10:12
Component HTML
<div data-component data-component-module="scaffold" data-component-init data-component-id="scaffold1" class="c_scaffold">
<!-- inner markup -->
</div>
@fchristant
fchristant / App.html
Last active September 3, 2019 18:36
App.js installation
<script src="/dragon.mjs" type="module"></script>