Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add function on_load to gradio-app web element * typo * fix test * add ready event * add custom events and use onMount * add changeset * add changeset * move event logic * add changeset * clean up whitespace * add onloadcomplete to guide * add changeset * add changeset * add highlight * change event name to render and ensure it runs after DOM mounting is complete * update docs * rename var * tweak * renaming * tweak * tweaks * mount statustracker nodes * typo * tweaks * copy tweak --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
- Loading branch information
1 parent
92282ce
commit 804fcc0
Showing
8 changed files
with
89 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
"@gradio/app": minor | ||
"gradio": minor | ||
--- | ||
|
||
highlight: | ||
|
||
#### Add `render` function to `<gradio-app>` | ||
|
||
We now have an event `render` on the <gradio-app> web component, which is triggered once the embedded space has finished rendering. | ||
|
||
```html | ||
<script> | ||
function handleLoadComplete() { | ||
console.log("Embedded space has finished rendering"); | ||
} | ||
const gradioApp = document.querySelector("gradio-app"); | ||
gradioApp.addEventListener("render", handleLoadComplete); | ||
</script> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.