[bugfix] Toast: render error when use getContainer (#3115)

This commit is contained in:
neverland
2019-04-09 22:46:57 +08:00
committed by GitHub
parent 2830f4cacd
commit b7b15fa183
3 changed files with 14 additions and 9 deletions

View File

@@ -44,3 +44,7 @@ export function isIOS(): boolean {
export function range(num: number, min: number, max: number): number {
return Math.min(Math.max(num, min), max);
}
export function isInDocument(element: HTMLElement): boolean {
return document.body.contains(element);
}