Skip to content

Commit

Permalink
feat(srcDoc): added onload arg
Browse files Browse the repository at this point in the history
  • Loading branch information
makhnatkin committed Oct 7, 2024
1 parent 546251e commit 8fadb91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/runtime/SrcDocIFrameController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ export class SrcDocIFrameController extends Disposable implements IEmbeddedConte

this.addAnchorLinkHandlers();
this.handleHashChange();
if (this.config.onload) {
this.dispose.add(() => this.config.onload?.(this.host));
const unload = this.config.onload?.(this.host);
if (unload) {
this.dispose.add(unload);
}
}

Expand Down

0 comments on commit 8fadb91

Please sign in to comment.