wip
This commit is contained in:
parent
6cf1fdbf82
commit
a0f3182a0a
2 changed files with 361 additions and 341 deletions
|
|
@ -79,6 +79,11 @@ export default class MiOS extends EventEmitter {
|
|||
*/
|
||||
private shouldRegisterSw: boolean;
|
||||
|
||||
/**
|
||||
* ウィンドウシステム
|
||||
*/
|
||||
public windows = new WindowSystem();
|
||||
|
||||
/**
|
||||
* MiOSインスタンスを作成します
|
||||
* @param shouldRegisterSw ServiceWorkerを登録するかどうか
|
||||
|
|
@ -359,6 +364,22 @@ export default class MiOS extends EventEmitter {
|
|||
}
|
||||
}
|
||||
|
||||
class WindowSystem {
|
||||
private windows = new Set();
|
||||
|
||||
public add(window) {
|
||||
this.windows.add(window);
|
||||
}
|
||||
|
||||
public remove(window) {
|
||||
this.windows.delete(window);
|
||||
}
|
||||
|
||||
public getAll() {
|
||||
return this.windows;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the URL safe base64 string to a Uint8Array
|
||||
* @param base64String base64 string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue