Skip to content

Instantly share code, notes, and snippets.

View Hazantip's full-sized avatar
🏠
Working from home

Hazantip

🏠
Working from home
View GitHub Profile
@Hazantip
Hazantip / Frame.js
Created July 12, 2018 13:29 — forked from robertgonzales/Frame.js
Use React portals to render inside shadow dom and iframes
class Frame extends Component {
componentDidMount() {
this.iframeHead = this.node.contentDocument.head
this.iframeRoot = this.node.contentDocument.body
this.forceUpdate()
}
render() {
const { children, head, ...rest } = this.props
return (