diff --git a/src/renderers/dom/client/ReactDOMIDOperations.js b/src/renderers/dom/client/ReactDOMIDOperations.js index 1eca7ea78d..637035fcd8 100644 --- a/src/renderers/dom/client/ReactDOMIDOperations.js +++ b/src/renderers/dom/client/ReactDOMIDOperations.js @@ -22,7 +22,7 @@ var invariant = require('invariant'); var setInnerHTML = require('setInnerHTML'); /** - * Errors for properties that should not be updated with `updatePropertyById()`. + * Errors for properties that should not be updated with `updatePropertyByID()`. * * @type {object} * @private diff --git a/src/renderers/dom/client/ReactEventListener.js b/src/renderers/dom/client/ReactEventListener.js index e30bd77d47..40c3a229d7 100644 --- a/src/renderers/dom/client/ReactEventListener.js +++ b/src/renderers/dom/client/ReactEventListener.js @@ -106,13 +106,13 @@ function handleTopLevelWithPath(bookKeeping) { var currentNativeTarget = path[0]; for (var i = 0; i < path.length; i++) { var currentPathElement = path[i]; - var currentPathElemenId = ReactMount.getID(currentPathElement); + var currentPathElemenID = ReactMount.getID(currentPathElement); if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) { currentNativeTarget = path[i + 1]; } if (ReactMount.isRenderedByReact(currentPathElement)) { - var newRootId = ReactInstanceHandles.getReactRootIDFromNodeID( - currentPathElemenId + var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID( + currentPathElemenID ); bookKeeping.ancestors.push(currentPathElement); @@ -126,10 +126,10 @@ function handleTopLevelWithPath(bookKeeping) { ); // Jump to the root of this React render tree - while (currentPathElemenId !== newRootId) { + while (currentPathElemenID !== newRootID) { i++; currentPathElement = path[i]; - currentPathElemenId = ReactMount.getID(currentPathElement); + currentPathElemenID = ReactMount.getID(currentPathElement); } } } diff --git a/src/renderers/shared/reconciler/__tests__/ReactIdentity-test.js b/src/renderers/shared/reconciler/__tests__/ReactIdentity-test.js index 6a23f45c12..da315f7bca 100644 --- a/src/renderers/shared/reconciler/__tests__/ReactIdentity-test.js +++ b/src/renderers/shared/reconciler/__tests__/ReactIdentity-test.js @@ -27,9 +27,9 @@ describe('ReactIdentity', function() { }); var idExp = /^\.[^.]+(.*)$/; - function checkId(child, expectedId) { + function checkID(child, expectedID) { var actual = idExp.exec(ReactMount.getID(child)); - var expected = idExp.exec(expectedId); + var expected = idExp.exec(expectedID); expect(actual).toBeTruthy(); expect(expected).toBeTruthy(); expect(actual[1]).toEqual(expected[1]); @@ -51,8 +51,8 @@ describe('ReactIdentity', function() { instance = React.render(instance, document.createElement('div')); var node = React.findDOMNode(instance); expect(node.childNodes.length).toBe(2); - checkId(node.childNodes[0], '.0.$first:0'); - checkId(node.childNodes[1], '.0.$second:0'); + checkID(node.childNodes[0], '.0.$first:0'); + checkID(node.childNodes[1], '.0.$second:0'); }); it('should allow key property to express identity', function() { @@ -67,10 +67,10 @@ describe('ReactIdentity', function() { instance = React.render(instance, document.createElement('div')); var node = React.findDOMNode(instance); expect(node.childNodes.length).toBe(4); - checkId(node.childNodes[0], '.0.$apple'); - checkId(node.childNodes[1], '.0.$banana'); - checkId(node.childNodes[2], '.0.$0'); - checkId(node.childNodes[3], '.0.$123'); + checkID(node.childNodes[0], '.0.$apple'); + checkID(node.childNodes[1], '.0.$banana'); + checkID(node.childNodes[2], '.0.$0'); + checkID(node.childNodes[3], '.0.$123'); }); it('should use instance identity', function() { @@ -92,12 +92,12 @@ describe('ReactIdentity', function() { var node = React.findDOMNode(instance); expect(node.childNodes.length).toBe(3); - checkId(node.childNodes[0], '.0.$wrap1'); - checkId(node.childNodes[0].firstChild, '.0.$wrap1.$squirrel'); - checkId(node.childNodes[1], '.0.$wrap2'); - checkId(node.childNodes[1].firstChild, '.0.$wrap2.$bunny'); - checkId(node.childNodes[2], '.0.2'); - checkId(node.childNodes[2].firstChild, '.0.2.$chipmunk'); + checkID(node.childNodes[0], '.0.$wrap1'); + checkID(node.childNodes[0].firstChild, '.0.$wrap1.$squirrel'); + checkID(node.childNodes[1], '.0.$wrap2'); + checkID(node.childNodes[1].firstChild, '.0.$wrap2.$bunny'); + checkID(node.childNodes[2], '.0.2'); + checkID(node.childNodes[2].firstChild, '.0.2.$chipmunk'); }); function renderAComponentWithKeyIntoContainer(key, container) { @@ -124,8 +124,8 @@ describe('ReactIdentity', function() { key = key.replace(/=/g, '=0'); - checkId(React.findDOMNode(span1), '.0.$' + key); - checkId(React.findDOMNode(span2), '.0.1:$' + key + ':0'); + checkID(React.findDOMNode(span1), '.0.$' + key); + checkID(React.findDOMNode(span2), '.0.1:$' + key + ':0'); } it('should allow any character as a key, in a detached parent', function() { diff --git a/src/renderers/shared/reconciler/__tests__/ReactMultiChildReconcile-test.js b/src/renderers/shared/reconciler/__tests__/ReactMultiChildReconcile-test.js index 61faf39897..62703ba775 100644 --- a/src/renderers/shared/reconciler/__tests__/ReactMultiChildReconcile-test.js +++ b/src/renderers/shared/reconciler/__tests__/ReactMultiChildReconcile-test.js @@ -189,21 +189,21 @@ function verifyDomOrderingAccurate(parentInstance, statusDisplays) { var containerNode = React.findDOMNode(parentInstance); var statusDisplayNodes = containerNode.childNodes; var i; - var orderedDomIds = []; + var orderedDomIDs = []; for (i = 0; i < statusDisplayNodes.length; i++) { - orderedDomIds.push(ReactMount.getID(statusDisplayNodes[i])); + orderedDomIDs.push(ReactMount.getID(statusDisplayNodes[i])); } - var orderedLogicalIds = []; + var orderedLogicalIDs = []; var username; for (username in statusDisplays) { if (!statusDisplays.hasOwnProperty(username)) { continue; } var statusDisplay = statusDisplays[username]; - orderedLogicalIds.push(ReactInstanceMap.get(statusDisplay)._rootNodeID); + orderedLogicalIDs.push(ReactInstanceMap.get(statusDisplay)._rootNodeID); } - expect(orderedDomIds).toEqual(orderedLogicalIds); + expect(orderedDomIDs).toEqual(orderedLogicalIDs); } /**