diff options
author | Ryan Johnson <rjohnson@mozilla.com> | 2021-04-29 16:16:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-29 16:16:42 -0700 |
commit | 95aca4b4d8fa62815d4bd412fff1a364f842814a (patch) | |
tree | 5e57661720fe9058d5c7db637e764800b50f9060 /files/ar/web/api/domtokenlist | |
parent | ee3b1c87e3c8e72ca130943eed260ad642246581 (diff) | |
download | translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.tar.gz translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.tar.bz2 translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.zip |
remove retired locales (#699)
Diffstat (limited to 'files/ar/web/api/domtokenlist')
-rw-r--r-- | files/ar/web/api/domtokenlist/index.html | 117 | ||||
-rw-r--r-- | files/ar/web/api/domtokenlist/length/index.html | 62 |
2 files changed, 0 insertions, 179 deletions
diff --git a/files/ar/web/api/domtokenlist/index.html b/files/ar/web/api/domtokenlist/index.html deleted file mode 100644 index a4981c8649..0000000000 --- a/files/ar/web/api/domtokenlist/index.html +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: DOMTokenList -slug: Web/API/DOMTokenList -tags: - - API - - DOM - - DOMTokenList - - Interface - - NeedsTranslation - - Reference - - TopicStub -translation_of: Web/API/DOMTokenList ---- -<div>{{APIRef("DOM")}}</div> - -<p>The <code><strong>DOMTokenList</strong></code> interface represents a set of space-separated tokens. Such a set is returned by {{domxref("Element.classList")}}, {{domxref("HTMLLinkElement.relList")}}, {{domxref("HTMLAnchorElement.relList")}}, {{domxref("HTMLAreaElement.relList")}}, {{domxref("HTMLIframeElement.sandbox")}}, or {{domxref("HTMLOutputElement.htmlFor")}}. It is indexed beginning with <code>0</code> as with JavaScript {{jsxref("Array")}} objects. <code>DOMTokenList</code> is always case-sensitive.</p> - -<h2 id="Properties">Properties</h2> - -<dl> - <dt>{{domxref("DOMTokenList.length")}} {{ReadOnlyInline}}</dt> - <dd>Is an <code>integer</code> representing the number of objects stored in the object.</dd> - <dt>{{domxref("DOMTokenList.value")}}</dt> - <dd>The value of the list as a {{domxref("DOMString")}}.</dd> -</dl> - -<h2 id="Methods">Methods</h2> - -<dl> - <dt>{{domxref("DOMTokenList.item()")}}</dt> - <dd>Returns an item in the list by its index (returns undefined if the number is greater than or equal to the length of the list).</dd> - <dt>{{domxref("DOMTokenList.contains()")}}</dt> - <dd>Returns <code>true</code> if the list contains the given <em>token</em>, otherwise <code>false</code>.</dd> - <dt>{{domxref("DOMTokenList.add()")}}</dt> - <dd>Adds the given <em>token</em> to the list.</dd> - <dt>{{domxref("DOMTokenList.remove()")}}</dt> - <dd>Removes the specified <em>token</em> from the list.</dd> - <dt>{{domxref("DOMTokenList.replace()")}}</dt> - <dd>Replaces an existing <em>token</em> with a new token.</dd> - <dt>{{domxref("DOMTokenList.supports()")}}</dt> - <dd>Returns <code>true</code> if a given <em>token</em> is in the associated attribute's supported tokens.</dd> - <dt>{{domxref("DOMTokenList.toggle()")}}</dt> - <dd>Removes a given <em>token</em> from the list and returns false. If <em>token</em> doesn't exist it's added and the function returns <code>true</code>.</dd> - <dt>{{domxref("DOMTokenList.entries()")}}</dt> - <dd>Returns an {{jsxref("Iteration_protocols","iterator")}} allowing you to go through all key/value pairs contained in this object.</dd> - <dt>{{domxref("DOMTokenList.forEach()")}}</dt> - <dd>Executes a provided function once per <code>DOMTokenList</code> element.</dd> - <dt>{{domxref("DOMTokenList.keys()")}}</dt> - <dd>Returns an {{jsxref("Iteration_protocols", "iterator")}} allowing you to go through all keys of the key/value pairs contained in this object.</dd> - <dt>{{domxref("DOMTokenList.values()")}}</dt> - <dd>Returns an {{jsxref("Iteration_protocols", "iterator")}} allowing you to go through all values of the key/value pairs contained in this object.</dd> -</dl> - -<h2 id="Examples">Examples</h2> - -<p>In the following simple example we retrieve the list of classes set on a {{htmlelement("p")}} element as a <code>DOMTokenList</code> using {{domxref("Element.classList")}}, add a class using {{domxref("DOMTokenList.add()")}}, and then update the {{domxref("Node.textContent")}} of the <code><p></code> to equal the <code>DOMTokenList</code>.</p> - -<p>First, the HTML:</p> - -<pre class="brush: html"><p class="a b c"></p></pre> - -<p>Now the JavaScript:</p> - -<pre class="brush: js">var para = document.querySelector("p"); -var classes = para.classList; -para.classList.add("d"); -para.textContent = 'paragraph classList is "' + classes + '"';</pre> - -<p>The output looks like this:</p> - -<p>{{ EmbedLiveSample('Examples', '100%', 60) }}</p> - -<h2 id="Trimming_of_whitespace_and_removal_of_duplicates">Trimming of whitespace and removal of duplicates</h2> - -<p>Methods that modify the <code>DOMTokenList</code> (such as {{domxref("DOMTokenList.add()")}}) automatically trim any excess whitespace and remove duplicate values from the list. For example:</p> - -<pre class="brush: html"><span class=" d d e f"></span></pre> - -<pre class="brush: js">var span = document.querySelector("span"); -var classes = span.classList; -span.classList.add("x"); -span.textContent = 'span classList is "' + classes + '"';</pre> - -<p>The output looks like this:</p> - -<p>{{ EmbedLiveSample('Trimming_of_whitespace_and_removal_of_duplicates', '100%', 60) }}</p> - -<h2 id="Specifications">Specifications</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName("DOM WHATWG", "#interface-domtokenlist", "DOMTokenList")}}</td> - <td>{{Spec2("DOM WHATWG")}}</td> - <td>Initial definition</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - - - -<p>{{Compat("api.DOMTokenList")}}</p> - -<h2 id="See_Also">See Also</h2> - -<ul> - <li>{{domxref("DOMSettableTokenList")}} (object that extends <code>DOMTokenList</code> with settable <em>.value</em> property)</li> -</ul> diff --git a/files/ar/web/api/domtokenlist/length/index.html b/files/ar/web/api/domtokenlist/length/index.html deleted file mode 100644 index c65f931027..0000000000 --- a/files/ar/web/api/domtokenlist/length/index.html +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: DOMTokenList.length -slug: Web/API/DOMTokenList/length -translation_of: Web/API/DOMTokenList/length ---- -<p>{{APIRef("DOM")}}</p> - -<p>The <code><strong>length</strong></code> read-only property of the {{domxref("DOMTokenList")}} interface is an <code>integer</code> representing the number of objects stored in the object.</p> - -<h2 id="بنية_الجملة">بنية الجملة</h2> - -<pre class="syntaxbox">tokenList.length;</pre> - -<h3 id="القيمة_العائدة">القيمة العائدة</h3> - -<p>تُعيد <code>رقم صحيح</code>.</p> - -<h2 id="أمثلة">أمثلة</h2> - -<p>في المثال التالي نقوم بإسترداد قيمة الـ classes الموضوعة داخل {{htmlelement("span")}} element as a <code>DOMTokenList</code> using {{domxref("Element.classList")}}, then write the length of the list to the <code><span></code>'s {{domxref("Node.textContent")}}.</p> - -<p>أولاً، الـ HTML:</p> - -<pre class="brush: html"><span class="a b c"></span></pre> - -<p>الآن الـ JavaScript:</p> - -<pre class="brush: js">var span = document.querySelector("span"); -var classes = span.classList; -var length = classes.length; - -span.textContent = 'classList length = ' + length; -</pre> - -<p>نتيجة الكود ستكون بالشكل التالي:</p> - -<p>{{ EmbedLiveSample('Examples', '100%', 60) }}</p> - -<h2 id="الخصائص">الخصائص</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('DOM WHATWG','#dom-domtokenlist-length','length')}}</td> - <td>{{Spec2('DOM WHATWG')}}</td> - <td>Initial definition</td> - </tr> - </tbody> -</table> - -<h2 id="دعم_المتصفحات">دعم المتصفحات</h2> - -<div> - - -<p>{{Compat("api.DOMTokenList.length")}}</p> -</div> |