Skip to content

Instantly share code, notes, and snippets.

View stefanseeger's full-sized avatar
🏠
Working from home

stefanseeger

🏠
Working from home
View GitHub Profile
/** Utils to be used in the User-Scripts */
'use strict';
class TmUtils {
/** @returns `Promise` which resolves when ``HTMLElement` for selector was found */
async waitForElement(selector, base = document) {
return new Promise((resolve) => {
if (this.$(selector, base)) {
return resolve(this.$(selector));
}
{macro main()}
<h1>Hello Instant Aria Templates</h1>
{/macro}