diff --git a/src/core/ReactDOM.js b/src/core/ReactDOM.js index c403b08962..b462671165 100644 --- a/src/core/ReactDOM.js +++ b/src/core/ReactDOM.js @@ -19,7 +19,7 @@ "use strict"; -var ReactNativeComponent = require('ReactNativeComponent'); +var ReactDOMComponent = require('ReactDOMComponent'); var mergeInto = require('mergeInto'); var objMapKeyVal = require('objMapKeyVal'); @@ -41,7 +41,7 @@ var objMapKeyVal = require('objMapKeyVal'); */ function createDOMComponentClass(tag, omitClose) { var Constructor = function() {}; - Constructor.prototype = new ReactNativeComponent(tag, omitClose); + Constructor.prototype = new ReactDOMComponent(tag, omitClose); Constructor.prototype.constructor = Constructor; var ConvenienceConstructor = function(props, children) { @@ -54,7 +54,7 @@ function createDOMComponentClass(tag, omitClose) { } /** - * Creates a mapping from supported HTML tags to `ReactNativeComponent` classes. + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. * This is also accessible via `React.DOM`. * * @public diff --git a/src/core/ReactNativeComponent.js b/src/core/ReactDOMComponent.js similarity index 96% rename from src/core/ReactNativeComponent.js rename to src/core/ReactDOMComponent.js index 396e01c889..53423d3c57 100644 --- a/src/core/ReactNativeComponent.js +++ b/src/core/ReactDOMComponent.js @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * @providesModule ReactNativeComponent + * @providesModule ReactDOMComponent * @typechecks static-only */ @@ -64,17 +64,17 @@ function assertValidProps(props) { } /** - * @constructor ReactNativeComponent + * @constructor ReactDOMComponent * @extends ReactComponent * @extends ReactMultiChild */ -function ReactNativeComponent(tag, omitClose) { +function ReactDOMComponent(tag, omitClose) { this._tagOpen = '<' + tag; this._tagClose = omitClose ? '' : ''; this.tagName = tag.toUpperCase(); } -ReactNativeComponent.Mixin = { +ReactDOMComponent.Mixin = { /** * Generates root tag markup then recurses. This method has side effects and @@ -87,7 +87,7 @@ ReactNativeComponent.Mixin = { * @return {string} The computed markup. */ mountComponent: ReactPerf.measure( - 'ReactNativeComponent', + 'ReactDOMComponent', 'mountComponent', function(rootID, transaction, mountDepth) { ReactComponent.Mixin.mountComponent.call( @@ -195,7 +195,7 @@ ReactNativeComponent.Mixin = { * @overridable */ updateComponent: ReactPerf.measure( - 'ReactNativeComponent', + 'ReactDOMComponent', 'updateComponent', function(transaction, prevProps) { ReactComponent.Mixin.updateComponent.call(this, transaction, prevProps); @@ -364,8 +364,8 @@ ReactNativeComponent.Mixin = { }; -mixInto(ReactNativeComponent, ReactComponent.Mixin); -mixInto(ReactNativeComponent, ReactNativeComponent.Mixin); -mixInto(ReactNativeComponent, ReactMultiChild.Mixin); +mixInto(ReactDOMComponent, ReactComponent.Mixin); +mixInto(ReactDOMComponent, ReactDOMComponent.Mixin); +mixInto(ReactDOMComponent, ReactMultiChild.Mixin); -module.exports = ReactNativeComponent; +module.exports = ReactDOMComponent; diff --git a/src/core/ReactMultiChild.js b/src/core/ReactMultiChild.js index affb0d67c8..501baa21ca 100644 --- a/src/core/ReactMultiChild.js +++ b/src/core/ReactMultiChild.js @@ -179,7 +179,7 @@ var ReactMultiChild = { /** * Provides common functionality for components that must reconcile multiple - * children. This is used by `ReactNativeComponent` to mount, update, and + * children. This is used by `ReactDOMComponent` to mount, update, and * unmount child components. * * @lends {ReactMultiChild.prototype} @@ -188,7 +188,7 @@ var ReactMultiChild = { /** * Generates a "mount image" for each of the supplied children. In the case - * of `ReactNativeComponent`, a mount image is a string of markup. + * of `ReactDOMComponent`, a mount image is a string of markup. * * @param {?object} children As returned by `flattenChildren`. * @return {array} An array of mounted representations. diff --git a/src/core/__tests__/ReactNativeComponent-test.js b/src/core/__tests__/ReactDOMComponent-test.js similarity index 96% rename from src/core/__tests__/ReactNativeComponent-test.js rename to src/core/__tests__/ReactDOMComponent-test.js index 764990e532..247257d662 100644 --- a/src/core/__tests__/ReactNativeComponent-test.js +++ b/src/core/__tests__/ReactDOMComponent-test.js @@ -23,7 +23,7 @@ var mocks = require('mocks'); -describe('ReactNativeComponent', function() { +describe('ReactDOMComponent', function() { describe('updateDOM', function() { var React; @@ -220,13 +220,13 @@ describe('ReactNativeComponent', function() { ReactDefaultInjection.inject(); var mixInto = require('mixInto'); - var ReactNativeComponent = require('ReactNativeComponent'); + var ReactDOMComponent = require('ReactDOMComponent'); var NodeStub = function(initialProps) { this.props = initialProps || {}; this._rootNodeID = 'test'; }; - mixInto(NodeStub, ReactNativeComponent.Mixin); + mixInto(NodeStub, ReactDOMComponent.Mixin); genMarkup = function(props) { return (new NodeStub(props))._createOpenTagMarkup(); @@ -261,14 +261,14 @@ describe('ReactNativeComponent', function() { require('mock-modules').dumpCache(); var mixInto = require('mixInto'); - var ReactNativeComponent = require('ReactNativeComponent'); + var ReactDOMComponent = require('ReactDOMComponent'); var ReactReconcileTransaction = require('ReactReconcileTransaction'); var NodeStub = function(initialProps) { this.props = initialProps || {}; this._rootNodeID = 'test'; }; - mixInto(NodeStub, ReactNativeComponent.Mixin); + mixInto(NodeStub, ReactDOMComponent.Mixin); genMarkup = function(props) { var transaction = new ReactReconcileTransaction(); @@ -300,14 +300,14 @@ describe('ReactNativeComponent', function() { var mixInto = require('mixInto'); var ReactComponent = require('ReactComponent'); var ReactMultiChild = require('ReactMultiChild'); - var ReactNativeComponent = require('ReactNativeComponent'); + var ReactDOMComponent = require('ReactDOMComponent'); var ReactReconcileTransaction = require('ReactReconcileTransaction'); var StubNativeComponent = function(initialProps) { ReactComponent.Mixin.construct.call(this, initialProps); }; mixInto(StubNativeComponent, ReactComponent.Mixin); - mixInto(StubNativeComponent, ReactNativeComponent.Mixin); + mixInto(StubNativeComponent, ReactDOMComponent.Mixin); mixInto(StubNativeComponent, ReactMultiChild.Mixin); mountComponent = function(props) { diff --git a/src/dom/components/ReactDOMButton.js b/src/dom/components/ReactDOMButton.js index 83dedd5459..348c838db1 100644 --- a/src/dom/components/ReactDOMButton.js +++ b/src/dom/components/ReactDOMButton.js @@ -23,7 +23,7 @@ var ReactDOM = require('ReactDOM'); var keyMirror = require('keyMirror'); -// Store a reference to the