diff options
Diffstat (limited to 'graffiti.js')
-rw-r--r-- | graffiti.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/graffiti.js b/graffiti.js index d28b64d..9b92b4f 100644 --- a/graffiti.js +++ b/graffiti.js @@ -1,4 +1,5 @@ -import Auth from './auth.js' +import Auth from './src/auth.js' +//import Collection from './src/collection.js' export default class { @@ -36,10 +37,12 @@ export default class { this.#connect() } - async waitTilOpen() { - await new Promise(resolve => { - this.eventTarget.addEventListener("graffitiOpen", () => resolve() ) - }) + async opened() { + if (!this.open) { + await new Promise(resolve => { + this.eventTarget.addEventListener("graffitiOpen", () => resolve() ) + }) + } } #connect() { |