From 80a5463a2c53391953cab29cbe9a939f4607c54d Mon Sep 17 00:00:00 2001 From: Cheng Lou Date: Thu, 15 May 2014 14:14:38 -0400 Subject: [PATCH] Remove filterAttributes.js This is no longer needed because of https://github.com/facebook/react/commit/089a494a1f0cc1892f1525fd746bac10c5a55175 mutateHTMLNodeWithMarkup.js was the only one using it. --- src/browser/ui/dom/filterAttributes.js | 45 -------------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/browser/ui/dom/filterAttributes.js diff --git a/src/browser/ui/dom/filterAttributes.js b/src/browser/ui/dom/filterAttributes.js deleted file mode 100644 index feb8c4143c..0000000000 --- a/src/browser/ui/dom/filterAttributes.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule filterAttributes - * @typechecks static-only - */ - -/*jslint evil: true */ - -'use strict'; - -/** - * Like filter(), but for a DOM nodes attributes. Returns an array of - * the filter DOMAttribute objects. Does some perf related this like - * caching attributes.length. - * - * @param {DOMElement} node Node whose attributes you want to filter - * @return {array} array of DOM attribute objects. - */ -function filterAttributes(node, func, context) { - var attributes = node.attributes; - var numAttributes = attributes.length; - var accumulator = []; - for (var i = 0; i < numAttributes; i++) { - var attr = attributes.item(i); - if (func.call(context, attr)) { - accumulator.push(attr); - } - } - return accumulator; -} - -module.exports = filterAttributes;