0.2.2 • Published 7 years ago
react-sandbox-frame v0.2.2
React Sandbox Frame
this package create an customizable and declarative iframe
usage
import React, { Component } from 'react'
import Frame from 'react-sandbox-frame'
export class WebView extends Component {
/**
* connect frame and you component
* @param {HTMLElement} document
*/
onLoad (document) {
console.log(document) // output <p>hello world</p>
}
render () {
return (
<Frame onLoad={this.onLoad.bind(this)}>
<p>hello world</p>
</Frame>
)
}
}
Optional Props
The Frame
component takes a couple of props that you can use to customize its behaviour:
children [?element]
onLoad [?function]
src [?string]
style [?object]
title [?string=page-wrapper]
stylesheets [?Array<String>=[]]
scripts [?Array<String>=[]]
0.2.2
7 years ago
0.2.1
7 years ago
0.2.0
7 years ago
0.1.1
8 years ago
0.1.0
8 years ago
0.0.21
8 years ago
0.0.20
8 years ago
0.0.18
8 years ago
0.0.18-0
8 years ago
0.0.17
8 years ago
0.0.16
8 years ago
0.0.15
8 years ago
0.0.14
8 years ago
0.0.13
8 years ago
0.0.12
8 years ago
0.0.11
8 years ago
0.0.10
8 years ago
0.0.9
8 years ago
0.0.8
8 years ago
0.0.7
8 years ago
0.0.6
8 years ago
0.0.5
8 years ago
0.0.4
8 years ago
0.0.3
8 years ago
0.0.2
8 years ago
0.0.1
8 years ago