diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 4f9afbc1d205d5a..d1f9cd5718596a6 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -1728,7 +1728,6 @@ /en-US/docs/DOM/StorageEvent /en-US/docs/Web/API/StorageEvent /en-US/docs/DOM/StyleSheetList /en-US/docs/Web/API/StyleSheetList /en-US/docs/DOM/Text /en-US/docs/Web/API/Text -/en-US/docs/DOM/Text.isElementContentWhitespace /en-US/docs/Web/API/Text/isElementContentWhitespace /en-US/docs/DOM/Text.replaceWholeText /en-US/docs/Web/API/Text/replaceWholeText /en-US/docs/DOM/Text.splitText /en-US/docs/Web/API/Text/splitText /en-US/docs/DOM/Text.wholeText /en-US/docs/Web/API/Text/wholeText @@ -3067,7 +3066,6 @@ /en-US/docs/Document_Object_Model_(DOM)/StyleSheet/title /en-US/docs/Web/API/StyleSheet/title /en-US/docs/Document_Object_Model_(DOM)/StyleSheet/type /en-US/docs/Web/API/StyleSheet/type /en-US/docs/Document_Object_Model_(DOM)/Text /en-US/docs/Web/API/Text -/en-US/docs/Document_Object_Model_(DOM)/Text.isElementContentWhitespace /en-US/docs/Web/API/Text/isElementContentWhitespace /en-US/docs/Document_Object_Model_(DOM)/Text.replaceWholeText /en-US/docs/Web/API/Text/replaceWholeText /en-US/docs/Document_Object_Model_(DOM)/Text.splitText /en-US/docs/Web/API/Text/splitText /en-US/docs/Document_Object_Model_(DOM)/Text.wholeText /en-US/docs/Web/API/Text/wholeText @@ -8604,7 +8602,6 @@ /en-US/docs/Web/API/SubtleCrypto.verify /en-US/docs/Web/API/SubtleCrypto/verify /en-US/docs/Web/API/SubtleCrypto.wrapKey /en-US/docs/Web/API/SubtleCrypto/wrapKey /en-US/docs/Web/API/Text.Text /en-US/docs/Web/API/Text/Text -/en-US/docs/Web/API/Text.isElementContentWhitespace /en-US/docs/Web/API/Text/isElementContentWhitespace /en-US/docs/Web/API/Text.replaceWholeText /en-US/docs/Web/API/Text/replaceWholeText /en-US/docs/Web/API/Text.splitText /en-US/docs/Web/API/Text/splitText /en-US/docs/Web/API/Text.wholeText /en-US/docs/Web/API/Text/wholeText diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 766ad9b61df4454..211c77c27bdf093 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -80699,23 +80699,6 @@ "jpmedley" ] }, - "Web/API/Text/isElementContentWhitespace": { - "modified": "2020-10-15T21:06:49.084Z", - "contributors": [ - "RainSlide", - "nakhodkiin", - "sideshowbarker", - "fscholz", - "teoli", - "afreen", - "Reachmeatshivam", - "Sheppy", - "ziyunfei", - "Ruakh", - "Jürgen Jeka", - "bcombee" - ] - }, "Web/API/Text/replaceWholeText": { "modified": "2020-10-15T21:10:09.962Z", "contributors": [ diff --git a/files/en-us/web/api/text/index.html b/files/en-us/web/api/text/index.html index 308a702f9a4383e..04e40b055c6c592 100644 --- a/files/en-us/web/api/text/index.html +++ b/files/en-us/web/api/text/index.html @@ -47,10 +47,6 @@
Returns a boolean flag indicating whether or not the text node contains only whitespace.
-Text
nodes logically adjacent to this {{domxref("Node")}}, concatenated in document order.{{ApiRef("DOM")}}{{deprecated_header}}
- -Note: You may replace it with /\s+/.test(Text.data)
, /\s+/.test(Text.nodeValue)
, or /\s+/.test(Text.textContent)
. Putting any property that represents the textual content of the Text
node into test()
should do the same work just like the three example above.
The Text.isElementContentWhitespace
read-only property returns a boolean flag indicating whether or not the text node's content consists solely of whitespace.
b = textnode.isElementContentWhitespace;- -
In the example below, we create a node with mixed display and whitespace characters and the attribute is false
.
var tn = document.createTextNode("Hello world"); -tn.isElementContentWhitespace; /* evaluates to false */ -- -
For a node that is all whitespace characters, the isElementContentWhitespace
evaluates to true.
var ws = document.createTextNode(" \t \r\n ") -ws.isElementContentWhitespace; /* evaluates to true */ -- -
{{Compat}}
- -