diff options
Diffstat (limited to 'files/pt-br/web/api/element')
7 files changed, 11 insertions, 11 deletions
diff --git a/files/pt-br/web/api/element/attributes/index.html b/files/pt-br/web/api/element/attributes/index.html index 6dc48f73f1..9ffbb57362 100644 --- a/files/pt-br/web/api/element/attributes/index.html +++ b/files/pt-br/web/api/element/attributes/index.html @@ -162,5 +162,5 @@ var atts = para.attributes;</pre> <ul> <li>{{domxref("NamedNodeMap")}}, a interface do objeto retornado</li> - <li>Considerações sobre a compatibilidade entre os navegadores: em <a class="external" href="http://www.quirksmode.org/dom/w3c_core.html#attributes" title="http://www.quirksmode.org/dom/w3c_core.html#attributes">quirksmode</a></li> + <li>Considerações sobre a compatibilidade entre os navegadores: em <a class="external" href="http://www.quirksmode.org/dom/w3c_core.html#attributes">quirksmode</a></li> </ul> diff --git a/files/pt-br/web/api/element/getattribute/index.html b/files/pt-br/web/api/element/getattribute/index.html index 4ebb34689e..e946c912e8 100644 --- a/files/pt-br/web/api/element/getattribute/index.html +++ b/files/pt-br/web/api/element/getattribute/index.html @@ -37,7 +37,7 @@ alert(align); // mostra o valor do atributo "align" do elemento com id="div1"</p <p>Quando for utilizado para um elemento HTML num DOM sinalizado como documento HTML, <code>getAttribute()</code> troca de caixa alta para caixa baixa (maiúscula para minúscula) seu argumento antes de prosseguir.</p> -<p>Essencialmente todos navegadores (Firefox, Internet Explorer, versões recentes do Opera, Safari, Konqueror, e iCab, por exemplo) retornam <code>null</code> quando o atributo especificado não existe no elemento em questão, seguindo que <a href="http://dom.spec.whatwg.org/#dom-element-getattribute" title="http://dom.spec.whatwg.org/#dom-element-getattribute">o esboço atual de especificações DOM</a> diz. A velha especificação do DOM 3 Core, por sua vez, diz que correto é retornar uma <em>string vazia</em> e algumas implementações de DOM se comportam dessa forma. Por exemplo, a implementação do getAttribute no XUL (Gecko) segue as especificações do DOM 3 Core e retorna uma string vazia. Consequentemente, deve-se usar {{domxref("Element.hasAttribute()")}} para checar a existência do atributo antes de utilizar o <code>getAttribute()</code>caso exista a possibilidade do argumento inexistir.</p> +<p>Essencialmente todos navegadores (Firefox, Internet Explorer, versões recentes do Opera, Safari, Konqueror, e iCab, por exemplo) retornam <code>null</code> quando o atributo especificado não existe no elemento em questão, seguindo que <a href="http://dom.spec.whatwg.org/#dom-element-getattribute">o esboço atual de especificações DOM</a> diz. A velha especificação do DOM 3 Core, por sua vez, diz que correto é retornar uma <em>string vazia</em> e algumas implementações de DOM se comportam dessa forma. Por exemplo, a implementação do getAttribute no XUL (Gecko) segue as especificações do DOM 3 Core e retorna uma string vazia. Consequentemente, deve-se usar {{domxref("Element.hasAttribute()")}} para checar a existência do atributo antes de utilizar o <code>getAttribute()</code>caso exista a possibilidade do argumento inexistir.</p> <div> <h2 id="Browser_compatibility">Compatibilidade com navegadores</h2> diff --git a/files/pt-br/web/api/element/innerhtml/index.html b/files/pt-br/web/api/element/innerhtml/index.html index f9ba30f9cf..51a6b4ea7d 100644 --- a/files/pt-br/web/api/element/innerhtml/index.html +++ b/files/pt-br/web/api/element/innerhtml/index.html @@ -110,7 +110,7 @@ el.innerHTML = name; // inofensivo, nesse caso name = "<script>alert('I am John in an annoying alert!')</script>"; el.innerHTML = name; // inofensivo, nesse caso</pre> -<p>Embora isso talvez se pareça como um ataque {{interwiki("wikipedia", "cross-site scripting")}}, o resultado é inofensivo. O HTML5 especifica que uma tag {{HTMLElement("script")}}, inserida via <code>innerHTML</code>, <a href="http://www.w3.org/TR/2008/WD-html5-20080610/dom.html#innerhtml0" title="http://www.w3.org/TR/2008/WD-html5-20080610/dom.html#innerhtml0">não deve ser executada</a>.</p> +<p>Embora isso talvez se pareça como um ataque {{interwiki("wikipedia", "cross-site scripting")}}, o resultado é inofensivo. O HTML5 especifica que uma tag {{HTMLElement("script")}}, inserida via <code>innerHTML</code>, <a href="http://www.w3.org/TR/2008/WD-html5-20080610/dom.html#innerhtml0">não deve ser executada</a>.</p> <p>No entanto, há formas de se executar JavaScript sem usar elementos {{HTMLElement("script")}}, por isso ainda há um risco de segurança sempre que você usa <code>innerHTML</code> para definir uma string sobre a qual você não tem controle. Por exemplo:</p> @@ -143,6 +143,6 @@ el.innerHTML = name; // exibe uma caixa de alerta</pre> <ul> <li><a class="external" href="http://innerdom.sourceforge.net/"><code>innerDOM</code></a> - Para aqueles que desejam aderir aos padrões, aqui oferece um conjunto de funções JavaScript para serializar ou analisar XML, de modo a configurar o conteúdo do elemento definido como uma string(s) através do DOM ou recuperando o conteúdo do elemento obtido a partir do DOM como uma string.</li> <li><a href="/en-US/docs/DOM/Element.insertAdjacentHTML" title="/en-US/docs/DOM/Element.insertAdjacentHTML">insertAdjacentHTML</a> - Uma alternativa para o innerHTML, permitindo você anexar um novo HTML, ao invés de trocá-la.</li> - <li><a class="external" href="http://code.google.com/p/jssaxparser/" title="http://code.google.com/p/jssaxparser/">jssaxparser</a> - Uma solução mais robusta (embora mais pesada) do innerDOM (suporta análise com namespaces, atributos com aspas simples, seções CDATA, etc.), esse é o analisador SAX2 quando usado com seu manipulador de conteúdo DOM. (Oferece String para DOM; DOM para String é <a class="external" href="http://code.assembla.com/brettz9/subversion/nodes/DOMToString" title="http://code.assembla.com/brettz9/subversion/nodes/DOMToString">significantemente mais fácil</a>)</li> - <li>Considerações de eficiência: Em <a class="external" href="http://www.quirksmode.org/dom/innerhtml.html" title="http://www.quirksmode.org/dom/innerhtml.html">quirksmode</a></li> + <li><a class="external" href="http://code.google.com/p/jssaxparser/" title="http://code.google.com/p/jssaxparser/">jssaxparser</a> - Uma solução mais robusta (embora mais pesada) do innerDOM (suporta análise com namespaces, atributos com aspas simples, seções CDATA, etc.), esse é o analisador SAX2 quando usado com seu manipulador de conteúdo DOM. (Oferece String para DOM; DOM para String é <a class="external" href="http://code.assembla.com/brettz9/subversion/nodes/DOMToString">significantemente mais fácil</a>)</li> + <li>Considerações de eficiência: Em <a class="external" href="http://www.quirksmode.org/dom/innerhtml.html">quirksmode</a></li> </ul> diff --git a/files/pt-br/web/api/element/mouseover_event/index.html b/files/pt-br/web/api/element/mouseover_event/index.html index e36be8d01a..a373e352ce 100644 --- a/files/pt-br/web/api/element/mouseover_event/index.html +++ b/files/pt-br/web/api/element/mouseover_event/index.html @@ -9,7 +9,7 @@ translation_of: Web/API/Element/mouseover_event <dl> <dt style="float: left; text-align: right; width: 120px;">Especificação</dt> - <dd style="margin: 0 0 0 120px;"><a class="external" href="http://www.w3.org/TR/DOM-Level-3-Events/#event-type-mouseover" title="http://www.w3.org/TR/DOM-Level-3-Events/#event-type-mouseover">DOM L3</a></dd> + <dd style="margin: 0 0 0 120px;"><a class="external" href="http://www.w3.org/TR/DOM-Level-3-Events/#event-type-mouseover">DOM L3</a></dd> <dt style="float: left; text-align: right; width: 120px;">Interface</dt> <dd style="margin: 0 0 0 120px;">{{domxref("MouseEvent")}}</dd> <dt style="float: left; text-align: right; width: 120px;">Bubbles</dt> diff --git a/files/pt-br/web/api/element/queryselectorall/index.html b/files/pt-br/web/api/element/queryselectorall/index.html index f34a01a25e..0e10be9f8c 100644 --- a/files/pt-br/web/api/element/queryselectorall/index.html +++ b/files/pt-br/web/api/element/queryselectorall/index.html @@ -106,7 +106,7 @@ var matches = el.querySelectorAll('div.highlighted > p'); </pre> <h2 id="Specification" name="Specification">Especificações</h2> <ul> - <li><a href="http://www.w3.org/TR/selectors-api/" title="http://www.w3.org/TR/selectors-api/">Selectors API</a></li> + <li><a href="http://www.w3.org/TR/selectors-api/">Selectors API</a></li> </ul> <h2 id="See_also" name="See_also">Veja também</h2> diff --git a/files/pt-br/web/api/element/scrolltop/index.html b/files/pt-br/web/api/element/scrolltop/index.html index f8f7dc4cd6..54a1ee8758 100644 --- a/files/pt-br/web/api/element/scrolltop/index.html +++ b/files/pt-br/web/api/element/scrolltop/index.html @@ -63,7 +63,7 @@ var<var> intElemScrollTop</var> = element.scrollTop; <h2 id="Referências">Referências</h2> <ul> - <li><a class="external" href="http://dev.w3.org/csswg/cssom-view/#dom-element-scrolltop" title="http://dev.w3.org/csswg/cssom-view/#dom-element-scrolltop">W3C Draft CSSOM View Module</a></li> - <li><a class="external" href="http://msdn.microsoft.com/en-us/library/ms534618(VS.85).aspx" title="http://msdn.microsoft.com/en-us/library/ms534618(VS.85).aspx">MSDN's scrollTop definition</a></li> - <li><a href="http://msdn.microsoft.com/en-us/library/hh781509(v=vs.85).aspx" title="http://msdn.microsoft.com/en-us/library/hh781509(v=vs.85).aspx">MSDN's Measuring Element Dimension and Location</a></li> + <li><a class="external" href="http://dev.w3.org/csswg/cssom-view/#dom-element-scrolltop">W3C Draft CSSOM View Module</a></li> + <li><a class="external" href="http://msdn.microsoft.com/en-us/library/ms534618(VS.85).aspx">MSDN's scrollTop definition</a></li> + <li><a href="http://msdn.microsoft.com/en-us/library/hh781509(v=vs.85).aspx">MSDN's Measuring Element Dimension and Location</a></li> </ul> diff --git a/files/pt-br/web/api/element/setattribute/index.html b/files/pt-br/web/api/element/setattribute/index.html index 0a3642be64..a0ae73c56e 100644 --- a/files/pt-br/web/api/element/setattribute/index.html +++ b/files/pt-br/web/api/element/setattribute/index.html @@ -54,5 +54,5 @@ b.setAttribute("disabled", "disabled"); <ul> <li><a class="external" href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-F68F082">DOM Level 2 Core: setAttribute</a> (introduzido em <a class="external" href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#method-setAttribute">DOM Level 1 Core</a>)</li> - <li><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/#apis-in-html-documents" title="http://www.whatwg.org/specs/web-apps/current-work/#apis-in-html-documents">HTML5: APIs in HTML documents</a></li> + <li><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/#apis-in-html-documents">HTML5: APIs in HTML documents</a></li> </ul> |