/**1* Copyright 2013-2015, Facebook, Inc.2* All rights reserved.3*4* This source code is licensed under the BSD-style license found in the5* LICENSE file in the root directory of this source tree. An additional grant6* of patent rights can be found in the PATENTS file in the same directory.7*8* @providesModule ReactDOMIframe9*/1011'use strict';1213var EventConstants = require("./EventConstants");14var LocalEventTrapMixin = require("./LocalEventTrapMixin");15var ReactBrowserComponentMixin = require("./ReactBrowserComponentMixin");16var ReactClass = require("./ReactClass");17var ReactElement = require("./ReactElement");1819var iframe = ReactElement.createFactory('iframe');2021/**22* Since onLoad doesn't bubble OR capture on the top level in IE8, we need to23* capture it on the <iframe> element itself. There are lots of hacks we could24* do to accomplish this, but the most reliable is to make <iframe> a composite25* component and use `componentDidMount` to attach the event handlers.26*/27var ReactDOMIframe = ReactClass.createClass({28displayName: 'ReactDOMIframe',29tagName: 'IFRAME',3031mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin],3233render: function() {34return iframe(this.props);35},3637componentDidMount: function() {38this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load');39}40});4142module.exports = ReactDOMIframe;434445