We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I need to do something after the iframe has finished loading, and I need to use callback functions.
The text was updated successfully, but these errors were encountered:
fix: fix onLoad props issue. #6
81ea22f
released v1.0.3 #6
91e870b
v1.0.3 released v1.0.3 #6 91e870b
68b5a72
@Mrcxt
import React, { useEffect, useState, Fragment } from 'react'; import IFrame, { useFrame } from '@uiw/react-iframe'; const InnerComponent = () => { // Hook returns iframe's window and document instances from Frame context const { document, window } = useFrame(); return ( <div> <div>Hello World!</div> </div> ); }; export default function Demo() { const onLoad = (evn) => { console.log("iframe loaded successfully!", evn) } return ( <IFrame onLoad={onLoad}> <InnerComponent /> </IFrame> ); }
Sorry, something went wrong.
No branches or pull requests
I need to do something after the iframe has finished loading, and I need to use callback functions.
The text was updated successfully, but these errors were encountered: