@stopsatgreen
fTs = document.querySelector('fun-times');
fTs.hooray();
p = Object.create(HTMLElement.prototype);
p.hooray = function() {…};
document.registerElement('fun-times',
{ prototype: p });
Slide 28
Slide 28 text
@stopsatgreen
However, ES6 has a better
way to do this.
Slide 29
Slide 29 text
@stopsatgreen
// ES6 way (not final)
class fTs extends HTMLElement {…}
document.registerElement('fun-times', fTs);
// current way
p = Object.create(HTMLElement.prototype);
document.registerElement('fun-times',
{ prototype: p });
Slide 30
Slide 30 text
@stopsatgreen
Custom Elements.
Approach is sound,
some details to finalise.