Skip to content

Update onreadystatecomplete.md #3230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,17 @@ contributors:

The `OnReadyStateComplete` event indicates that the content of the IFRAME has loaded and can be accessed in code. Use this event when referencing IFRAME controls within your scripts.

Use the [control's](/powerapps/developer/model-driven-apps/clientapi/reference/controls/getcontrol) **addOnReadyStateComplete** and **removeOnReadyStateComplete** methods to manage event handlers for this event. Here's an example:

```JavaScript
function onLoad(executionContext)
{
let formContext = executionContext.getFormContext();
let webResource = formContext.getControl("webResourceName");
webResource.addOnReadyStateComplete(context => {
//do something
});
}
```



[!INCLUDE[footer-include](../../../../../includes/footer-banner.md)]
[!INCLUDE[footer-include](../../../../../includes/footer-banner.md)]