Created
April 17, 2014 18:16
-
-
Save zpao/11002454 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @jsx React.DOM */ | |
var SWF = React.createClass({ | |
componentDidMount: function() { | |
var newNode = document.createElement('div'); | |
var myNode = this.getDOMNode(); | |
myNode.appendChild(newNode); | |
swfobject.embedSWF(this.props.file, newNode); | |
}, | |
render: function() { | |
return <div />; | |
} | |
}); | |
React.renderComponent(<SWF file ="path/to/file.swf" />, document.body); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment