Skip to content

Instantly share code, notes, and snippets.



Last active Oct 24, 2017
What would you like to do?
const REALM = Symbol();
Object.define(HTMLElement.prototype, 'realm', {
get() {
if (!Reflect.has(this, REALM)) this[REALM] = window; // Your construction logic goes here
return this[REALM];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment