diff options
Diffstat (limited to 'files/pt-br/web/api/navigator/cookieenabled/index.html')
-rw-r--r-- | files/pt-br/web/api/navigator/cookieenabled/index.html | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/files/pt-br/web/api/navigator/cookieenabled/index.html b/files/pt-br/web/api/navigator/cookieenabled/index.html new file mode 100644 index 0000000000..430471cb24 --- /dev/null +++ b/files/pt-br/web/api/navigator/cookieenabled/index.html @@ -0,0 +1,49 @@ +--- +title: Navigator.cookieEnabled +slug: Web/API/Navigator/cookieEnabled +translation_of: Web/API/Navigator/cookieEnabled +--- +<p>{{ ApiRef("HTML DOM") }}</p> + +<p><span class="seoSummary"><code>navigator.cookieEnabled</code> retorna um valor <dfn>Booleano</dfn> que indica quando<em lang="en"> cookies</em> estão habilitados ou não.</span> A propriedade é de apenas leitura.</p> + +<h2 id="Sintaxe">Sintaxe</h2> + +<pre class="brush: js">var cookieEnabled = navigator.cookieEnabled; +</pre> + +<ul> + <li><code>cookieEnabled</code> é um <a href="/pt-BR/docs/Glossario/Booleano">Booleano</a>: <code>true</code> ou <code>false</code>.</li> +</ul> + +<h2 id="Exemplo">Exemplo</h2> + +<pre class="brush: js">if (!navigator.cookieEnabled) { + // The browser does not support or is blocking cookies from being set. +} +</pre> + +<h2 id="Especificações">Especificações</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Especificação</th> + <th scope="col">Status</th> + <th scope="col">Comentário</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName("HTML WHATWG", "webappapis.html#dom-navigator-cookieenabled", "Navigator.cookieEnabled")}}</td> + <td>{{Spec2("HTML WHATWG")}}</td> + <td>Initial definition</td> + </tr> + </tbody> +</table> + +<h2 id="Compatibilidade_entre_navegadores">Compatibilidade entre navegadores</h2> + + + +<p>{{Compat("api.Navigator.cookieEnabled")}}</p> |