Remove goog.dom

This commit is contained in:
nicholas
2016-03-26 23:13:10 +13:00
committed by Nicholas L
parent 29c8af7559
commit 6b465902cd
37 changed files with 446 additions and 320 deletions

View File

@@ -1,7 +1,6 @@
goog.provide('ol.xml');
goog.require('goog.asserts');
goog.require('goog.dom.NodeType');
goog.require('ol.array');
@@ -48,8 +47,8 @@ ol.xml.getAllTextContent = function(node, normalizeWhitespace) {
* @return {Array.<string>} Accumulator.
*/
ol.xml.getAllTextContent_ = function(node, normalizeWhitespace, accumulator) {
if (node.nodeType == goog.dom.NodeType.CDATA_SECTION ||
node.nodeType == goog.dom.NodeType.TEXT) {
if (node.nodeType == Node.CDATA_SECTION_NODE ||
node.nodeType == Node.TEXT_NODE) {
if (normalizeWhitespace) {
// FIXME understand why goog.dom.getTextContent_ uses String here
accumulator.push(String(node.nodeValue).replace(/(\r\n|\r|\n)/g, ''));