ondras / rot.js

ROguelike Toolkit in JavaScript. Cool dungeon-related stuff, interactive manual, documentation, tests!
https://ondras.github.io/rot.js/hp/
BSD 3-Clause "New" or "Revised" License
2.33k stars 254 forks source link

Proof of concept with HTML5 Custom Elements #104

Open techtonik opened 7 years ago

techtonik commented 7 years ago

Just wanted to share this possibility. Browser support is somewhat limited though.

http://caniuse.com/#search=custom%20elements

ondras commented 7 years ago

Pretty neat :)

Please note that the registerElement API is deprecated and browsers are implementing the V1 API, window.customElements.define().

This proof of concept for the homepage is merely a showcase of a technology, but in rot.js, we might actually offer a full-blown custom component <rot-display>, a HTML wrapper for ROT.Display. Not sure if worth it though, as this is probably the only part of rot.js that has a meaningfull custom element.