tingle.js: setContent() accepts Node (#46614)

This commit is contained in:
Ye-hyoung Kang 2020-08-19 09:18:02 +09:00 committed by GitHub
parent 16ad6a4098
commit f74772c4e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -17,7 +17,7 @@ export interface Options {
}
export class modal {
constructor(options?: Options);
setContent(content: string | Element): void;
setContent(content: string | Node): void;
getContent(): HTMLDivElement;
destroy(): void;
open(): void;

View File

@ -6,6 +6,10 @@ instance.checkOverflow();
instance.close();
instance.close();
instance.setContent("string content");
instance.setContent(new Node());
instance.setContent(new DocumentFragment());
instance = new modal({
onOpen() {
this.checkOverflow();