diff options
Diffstat (limited to 'files/pt-br/web/api/domstringmap/index.html')
-rw-r--r-- | files/pt-br/web/api/domstringmap/index.html | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/files/pt-br/web/api/domstringmap/index.html b/files/pt-br/web/api/domstringmap/index.html new file mode 100644 index 0000000000..df9d74a7bd --- /dev/null +++ b/files/pt-br/web/api/domstringmap/index.html @@ -0,0 +1,141 @@ +--- +title: DOMStringMap +slug: Web/API/DOMStringMap +translation_of: Web/API/DOMStringMap +--- +<p>{{ APIRef("HTML DOM") }}</p> + +<p>Usado pelo atributo HTML {{ htmlattrxref("dataset") }} para representar atributos próprios adicionados ao elemento.</p> + +<h2 id="Method_overview" name="Method_overview">Visão Geral do Método</h2> + +<table class="standard-table"> + <tbody> + <tr> + <td><code>DOMString <a href="#getDataAttr()">getDataAttr</a>(in DOMString prop);</code></td> + </tr> + <tr> + <td><code>boolean <a href="#hasDataAttr()">hasDataAttr</a>(in DOMString prop);</code></td> + </tr> + <tr> + <td><code>void <a href="#removeDataAttr()">removeDataAttr</a>(in DOMString prop);</code></td> + </tr> + <tr> + <td><code>void <a href="#removeProp()">removeProp</a>(in nsIAtom attr);</code></td> + </tr> + <tr> + <td><code>void <a href="#setDataAttr()">setDataAttr</a>(in DOMString prop, in DOMString value);</code></td> + </tr> + </tbody> +</table> + +<h2 id="Methods" name="Methods">Métodos</h2> + +<h3 id="hasDataAttr()">hasDataAttr()</h3> + +<pre class="eval">boolean hasDataAttr( + in DOMString prop +); +</pre> + +<h6 id="Parameters" name="Parameters">Parâmetros</h6> + +<dl> + <dt><code>prop</code></dt> + <dd>Nome da propriedade a qual a existência deve ser verificada.</dd> +</dl> + +<h6 id="Return_value" name="Return_value">Retorno</h6> + +<p><code>true</code> se a propriedade existir ou <code>false</code> se não existir.</p> + +<h3 id="removeDataAttr()">removeDataAttr()</h3> + +<pre class="eval">void removeDataAttr( + in DOMString prop +); +</pre> + +<h6 id="Parameters" name="Parameters">Parâmetros</h6> + +<dl> + <dt><code>prop</code></dt> + <dd>Propriedade a ser removida do data set.</dd> +</dl> + +<h3 id="removeProp()">removeProp()</h3> + +<p>Remove a propriedade do dataset do objeto. Usada para atualizar o objeto de dataset do objeto quando o atributo data-* houver sido removido do elemento.</p> + +<pre class="eval">void removeProp( + in nsIAtom attr +); +</pre> + +<h6 id="Parameters" name="Parameters">Parâmetros</h6> + +<dl> + <dt><code>attr</code></dt> + <dd>A propriedade a ser removida do dataset.</dd> +</dl> + +<h2 id="Compatibilidade">Compatibilidade</h2> + +<p>{{ CompatibilityTable() }}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Edge</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>Suporte básico</td> + <td>{{ CompatUnknown() }}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{ CompatGeckoDesktop("6.0") }}</td> + <td>{{ CompatUnknown() }}</td> + <td>{{ CompatUnknown() }}</td> + <td>{{ CompatUnknown() }}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Edge</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Suporte básico</td> + <td>{{ CompatUnknown() }}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{ CompatUnknown() }}</td> + <td>{{ CompatUnknown() }}</td> + <td>{{ CompatUnknown() }}</td> + <td>{{ CompatUnknown() }}</td> + </tr> + </tbody> +</table> +</div> + +<h2 id="Veja_também">Veja também</h2> + +<ul> + <li>{{ domxref("HTMLElement.dataset") }}</li> + <li>{{ htmlattrxref("dataset") }}</li> +</ul> |