From 403649f7b5e6d8208e968a636cd92098b15f2178 Mon Sep 17 00:00:00 2001 From: "Michael[tm] Smith" Date: Wed, 13 Jan 2021 11:11:32 +0900 Subject: [PATCH] Redirect window.isSecureContext doc; fix spec URL Fixes https://github.com/mdn/content/issues/1192 --- files/en-us/_redirects.txt | 1 + files/en-us/_wikihistory.json | 14 ----- .../web/api/window/issecurecontext/index.html | 61 ------------------- .../issecurecontext/index.html | 9 +-- 4 files changed, 3 insertions(+), 82 deletions(-) delete mode 100644 files/en-us/web/api/window/issecurecontext/index.html diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index c4d5b0b67f353b0..e147aa243d09d33 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -9092,6 +9092,7 @@ /en-US/docs/Web/API/Window/clearTimeout /en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearTimeout /en-US/docs/Web/API/Window/fetch /en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch /en-US/docs/Web/API/Window/indexedDB /en-US/docs/Web/API/WindowOrWorkerGlobalScope/indexedDB +/en-US/docs/Web/API/Window/isSecureContext /en-US/docs/Web/API/WindowOrWorkerGlobalScope/isSecureContext /en-US/docs/Web/API/Window/mozRequestAnimationFrame /en-US/docs/Web/API/window/requestAnimationFrame /en-US/docs/Web/API/Window/onabort /en-US/docs/Web/API/GlobalEventHandlers/onabort /en-US/docs/Web/API/Window/onafterprint /en-US/docs/Web/API/WindowEventHandlers/onafterprint diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 48457801cde847e..505d8fabeb6d38a 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -94532,20 +94532,6 @@ "Wladimir_Palant" ] }, - "Web/API/Window/isSecureContext": { - "modified": "2020-10-29T06:26:42.696Z", - "contributors": [ - "chrisdavidmills", - "connorshea", - "erikadoyle", - "mnoorenberghe", - "simevidas", - "fscholz", - "jonathanKingston", - "rolfedh", - "jpmedley" - ] - }, "Web/API/Window/languagechange_event": { "modified": "2020-10-15T21:27:31.490Z", "contributors": [ diff --git a/files/en-us/web/api/window/issecurecontext/index.html b/files/en-us/web/api/window/issecurecontext/index.html deleted file mode 100644 index c3b49e5b8af54e8..000000000000000 --- a/files/en-us/web/api/window/issecurecontext/index.html +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: Window.isSecureContext -slug: Web/API/Window/isSecureContext -tags: -- API -- Property -- Reference -- Security -- Window ---- -

{{APIRef}}

- -

The window.isSecureContext read-only property indicates - whether a context is capable of using features that require secure contexts.

- -

Syntax

- -
var isSecure = window.isSecureContext
- -

Examples

- -

Feature detection

- -

You can use feature detection to check whether they are in a secure context or not by - using the isSecureContext boolean which is exposed on the global scope.

- -
if (window.isSecureContext) {
-  // Page is a secure context so service workers are now available
-  navigator.serviceWorker.register("/offline-worker.js").then(function () {
-    ...
-  });
-}
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Secure Contexts')}}{{Spec2('Secure Contexts','#monkey-patching-global-object','isSecureContext')}} - Initial definition.
- -

Browser compatibility

- -

{{Compat("api.Window.isSecureContext")}}

- -

See also

- - diff --git a/files/en-us/web/api/windoworworkerglobalscope/issecurecontext/index.html b/files/en-us/web/api/windoworworkerglobalscope/issecurecontext/index.html index fba795ea79a6575..6126ffda71a74f3 100644 --- a/files/en-us/web/api/windoworworkerglobalscope/issecurecontext/index.html +++ b/files/en-us/web/api/windoworworkerglobalscope/issecurecontext/index.html @@ -1,5 +1,5 @@ --- -title: WindowOrWorkerGlobalScope.isSecureContext +title: 'WindowOrWorkerGlobalScope: isSecureContext' slug: Web/API/WindowOrWorkerGlobalScope/isSecureContext tags: - API @@ -11,12 +11,7 @@ - Workers - isSecureContext --- -

{{APIRef}}{{SeeCompatTable}}

- -

The isSecureContext read-only property of the - {{domxref("WindowOrWorkerGlobalScope")}} interface returns a boolean indicating whether - the current context is secure - (true) or not (false).

+

The isSecureContext read-only property of the {{domxref("WindowOrWorkerGlobalScope")}} interface returns a boolean indicating whether the current context is secure (true) or not (false).

Syntax