UNPKG

@uiw/react-iframe

Version:

This component allows you to wrap your entire React application or each component in an iFrame.

14 lines 314 B
import React from 'react'; var doc; var win; if (typeof document !== 'undefined') { doc = document; } if (typeof window !== 'undefined') { win = window; } export var FrameContext = /*#__PURE__*/React.createContext({ document: doc, window: win }); export var useFrame = () => React.useContext(FrameContext);