@mdn/fred 1.6.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env-dist +4 -0
- package/CHANGELOG.md +25 -0
- package/build/eslint-fred.js +6 -4
- package/build/plugins/generate-element-map.js +3 -2
- package/build/utils.js +0 -23
- package/components/curriculum/module.css +1 -0
- package/components/curriculum-module/server.css +1 -0
- package/components/env/index.js +3 -0
- package/components/footer/server.js +1 -1
- package/components/live-sample-result/element.js +1 -0
- package/components/menu/base.css +2 -1
- package/components/menu/constants.js +443 -147
- package/components/menu/missing-docs.json +140 -0
- package/components/menu/server.js +78 -657
- package/components/menu/types.d.ts +50 -0
- package/components/menu/update-missing-docs.js +66 -0
- package/components/outer-layout/utils.js +2 -2
- package/components/play-runner/element.js +14 -6
- package/entry.client.js +1 -0
- package/hooks/ga-init.js +31 -0
- package/hooks/glean-init.js +2 -6
- package/l10n/fr.ftl +145 -1
- package/out/service-worker.js +1 -1
- package/out/service-worker.js.map +1 -1
- package/out/static/client/{6480.09f744cd2fb69ed8.js → 6480.c839ead24f125a7e.js} +3 -2
- package/out/static/client/{6480.09f744cd2fb69ed8.js.map → 6480.c839ead24f125a7e.js.map} +1 -1
- package/out/static/client/9914.021220acc0d3e777.js +11 -0
- package/out/static/client/9914.021220acc0d3e777.js.map +1 -0
- package/out/static/client/index.0f1f5c05b3c9458b.js +412 -0
- package/out/static/client/index.0f1f5c05b3c9458b.js.map +1 -0
- package/out/static/client/{runtime.b178b9749f31202a.js → runtime.f3c0cd5b45c6e874.js} +2 -2
- package/out/static/client/{runtime.b178b9749f31202a.js.map → runtime.f3c0cd5b45c6e874.js.map} +1 -1
- package/out/static/client/stats.json +116 -116
- package/out/static/client/styles-curriculum-landing.cbaf6ff367369a26.css.map +1 -1
- package/out/static/client/styles-curriculum-module.c7ec78d3e724cf64.css.map +1 -1
- package/out/static/client/{styles-global.fb7afecd89ca2dff.js → styles-global.52fa98f0e9ec0040.js} +1 -1
- package/out/static/client/{styles-global.684fd2c5254c94b8.css → styles-global.75b8c75561733419.css} +2 -2
- package/out/static/client/{styles-global.684fd2c5254c94b8.css.map → styles-global.75b8c75561733419.css.map} +1 -1
- package/out/static/client/styles-menu.c41c14be9597dcd9.css +2 -0
- package/out/static/client/styles-menu.c41c14be9597dcd9.css.map +1 -0
- package/out/static/legacy/asset-manifest.json +5 -5
- package/out/static/legacy/{index.ad3600b01e18974e.html → index.4d5b9af908771553.html} +1 -1
- package/out/static/legacy/{index.5592b02d966df8ba.js → index.e275f57e34e5ad42.js} +3 -3
- package/out/static/legacy/{index.5592b02d966df8ba.js.map → index.e275f57e34e5ad42.js.map} +1 -1
- package/out/static/legacy/stats.json +10 -10
- package/out/static/legacy/{yari.8ce0be252d1ae155.js → yari.28c752c4002c881d.js} +3 -3
- package/out/static/legacy/{yari.8ce0be252d1ae155.js.map → yari.28c752c4002c881d.js.map} +1 -1
- package/out/static/ssr/index.js +306 -580
- package/out/static/ssr/index.js.map +1 -1
- package/out/static/ssr/stats.json +4 -4
- package/package.json +9 -9
- package/utils/dnt-helper.js +59 -0
- package/utils/name-transformation.js +40 -0
- package/utils/telemetry-opt-out.js +12 -0
- package/components/menu/check-missing-docs.js +0 -44
- package/out/static/client/9914.251fe19f0038e97b.js +0 -11
- package/out/static/client/9914.251fe19f0038e97b.js.map +0 -1
- package/out/static/client/index.26176fe4ab13dce5.js +0 -268
- package/out/static/client/index.26176fe4ab13dce5.js.map +0 -1
- package/out/static/client/styles-menu.5193bf2642ae7d64.css +0 -2
- package/out/static/client/styles-menu.5193bf2642ae7d64.css.map +0 -1
- /package/out/static/client/{6480.09f744cd2fb69ed8.js.LICENSE.txt → 6480.c839ead24f125a7e.js.LICENSE.txt} +0 -0
- /package/out/static/client/{index.26176fe4ab13dce5.js.LICENSE.txt → index.0f1f5c05b3c9458b.js.LICENSE.txt} +0 -0
- /package/out/static/legacy/{index.5592b02d966df8ba.js.LICENSE.txt → index.e275f57e34e5ad42.js.LICENSE.txt} +0 -0
- /package/out/static/legacy/{yari.8ce0be252d1ae155.js.LICENSE.txt → yari.28c752c4002c881d.js.LICENSE.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! For license information please see 6480.
|
|
1
|
+
/*! For license information please see 6480.c839ead24f125a7e.js.LICENSE.txt */
|
|
2
2
|
export const __webpack_id__="6480";export const __webpack_ids__=["6480"];export const __webpack_modules__={35030:function(e,t,i){i.d(t,{A:()=>h});var n=i(63819),s=i(31601),l=i.n(s),r=i(76314),a=i.n(r),c=i(55196),o=i(59235),d=a()(l());d.i(c.A),d.i(o.A),d.push([e.id,".code-example .example-header{justify-content:end;padding-right:.5rem}@media print{.example-header,mdn-button{display:none!important}}",""]);let h=(0,n.AH)([d.toString()])},4225:function(e,t,i){i.r(t),i.d(t,{MDNLiveSampleResult:()=>MDNLiveSampleResult});var n=i(63819),s=i(38758),l=i(86484),r=i(35030);i(86129),i(99638);let MDNLiveSampleResult=class MDNLiveSampleResult extends(0,l.J)(n.WF){static styles=r.A;static properties={liveId:{attribute:"live-id"},code:{type:Object},allowed:{},sandbox:{},srcPrefix:{attribute:"src-prefix"},height:{},breakoutLink:{state:!0}};constructor(){super(),this.liveId=void 0,this.code=void 0,this.allow=void 0,this.sandbox=void 0,this.srcPrefix=void 0,this.height=void 0,this.breakoutLink=void 0}_openFullscreen(e=!1){this._runnerSrc?e||this._fullscreenReplace?location.replace(this._runnerSrc):location.href=this._runnerSrc:(this._fullscreenPending=!0,e&&(this._fullscreenReplace=!0))}_fullscreenClick(e){this.liveId&&e.target instanceof HTMLAnchorElement&&e.target.hash===`#livesample_fullscreen=${this.liveId}`&&(e.preventDefault(),this._openFullscreen())}_runnerSrcUpdated({detail:e}){this._runnerSrc=e,this._fullscreenPending&&this._openFullscreen();let t=new URL("/en-US/play",location.href);t.search=new URL(this._runnerSrc).search,this.srcPrefix&&t.searchParams.append("srcPrefix",this.srcPrefix),this.breakoutLink=t.href}connectedCallback(){super.connectedCallback(),this._fullscreenClick=this._fullscreenClick.bind(this),document.addEventListener("click",this._fullscreenClick),location.hash===`#livesample_fullscreen=${this.liveId}`&&this._openFullscreen()}render(){return(0,n.qy)`
|
|
3
3
|
<div class="code-example">
|
|
4
4
|
<div class="example-header">
|
|
@@ -18,8 +18,9 @@ export const __webpack_id__="6480";export const __webpack_ids__=["6480"];export
|
|
|
18
18
|
.allow=${this.allow}
|
|
19
19
|
.sandbox=${[...new Set(["allow-modals",...this.sandbox?.split(" ")||[]])].join(" ")}
|
|
20
20
|
.srcPrefix=${this.srcPrefix}
|
|
21
|
+
permalink
|
|
21
22
|
style=${(0,s.W)({height:this.height?`${this.height}${/[0-9]$/.test(this.height)?"px":""}`:void 0})}
|
|
22
23
|
></mdn-play-runner>
|
|
23
24
|
</div>
|
|
24
25
|
`}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._fullscreenClick)}};customElements.define("mdn-live-sample-result",MDNLiveSampleResult)},62963:function(e,t,i){i.d(t,{J:()=>s});var n=i(97160);let s=e=>e??n.s6},70209:function(e,t,i){i.d(t,{D:()=>r});var n=i(97160),s=i(17316),l=i(98176);let r=(0,s.u$)(class extends s.WL{constructor(){super(...arguments),this.key=n.s6}render(e,t){return this.key=e,t}update(e,[t,i]){return t!==this.key&&((0,l.mY)(e),this.key=t),i}})}};
|
|
25
|
-
//# sourceMappingURL=6480.
|
|
26
|
+
//# sourceMappingURL=6480.c839ead24f125a7e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"6480.
|
|
1
|
+
{"version":3,"file":"6480.c839ead24f125a7e.js","sources":["webpack://@mdn/fred/./components/live-sample-result/element.css","webpack://@mdn/fred/./components/live-sample-result/element.js","webpack://@mdn/fred/./node_modules/lit-html/directives/if-defined.js","webpack://@mdn/fred/./node_modules/lit-html/directives/keyed.js"],"sourcesContent":["import { css } from \"lit\";\n// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_0___ from \"-!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../build/loaders/fix-light-dark.js!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!../global/global.css\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_1___ from \"-!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../build/loaders/fix-light-dark.js!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!../code-example/common.css\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_1___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.code-example .example-header{justify-content:end;padding-right:.5rem}@media print{.example-header,mdn-button{display:none!important}}`, \"\"]);\n// Exports\nexport default css([___CSS_LOADER_EXPORT___.toString()]);\n","import { LitElement, html, nothing } from \"lit\";\n\nimport { styleMap } from \"lit/directives/style-map.js\";\n\nimport { L10nMixin } from \"../../l10n/mixin.js\";\n\nimport styles from \"./element.css?lit\";\n\nimport \"../play-runner/element.js\";\nimport \"../button/element.js\";\n\nexport class MDNLiveSampleResult extends L10nMixin(LitElement) {\n static styles = styles;\n\n static properties = {\n liveId: { attribute: \"live-id\" },\n code: { type: Object },\n allowed: {},\n sandbox: {},\n srcPrefix: { attribute: \"src-prefix\" },\n height: {},\n breakoutLink: { state: true },\n };\n\n constructor() {\n super();\n /** @type {string | undefined} */\n this.liveId = undefined;\n /** @type {Record<string, string> | undefined} */\n this.code = undefined;\n /** @type {string | undefined} */\n this.allow = undefined;\n /** @type {string | undefined} */\n this.sandbox = undefined;\n /** @type {string | undefined} */\n this.srcPrefix = undefined;\n /** @type {string | undefined} */\n this.height = undefined;\n /** @type {string | undefined} */\n this.breakoutLink = undefined;\n }\n\n _openFullscreen(replace = false) {\n if (this._runnerSrc) {\n if (replace || this._fullscreenReplace) {\n location.replace(this._runnerSrc);\n } else {\n location.href = this._runnerSrc;\n }\n } else {\n this._fullscreenPending = true;\n if (replace) {\n this._fullscreenReplace = true;\n }\n }\n }\n\n /** @param {MouseEvent} event */\n _fullscreenClick(event) {\n if (\n this.liveId &&\n event.target instanceof HTMLAnchorElement &&\n event.target.hash === `#livesample_fullscreen=${this.liveId}`\n ) {\n event.preventDefault();\n this._openFullscreen();\n }\n }\n\n /** @param {CustomEvent<string>} event */\n _runnerSrcUpdated({ detail }) {\n this._runnerSrc = detail;\n if (this._fullscreenPending) {\n this._openFullscreen();\n }\n const playUrl = new URL(\"/en-US/play\", location.href);\n playUrl.search = new URL(this._runnerSrc).search;\n if (this.srcPrefix)\n playUrl.searchParams.append(\"srcPrefix\", this.srcPrefix);\n this.breakoutLink = playUrl.href;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this._fullscreenClick = this._fullscreenClick.bind(this);\n document.addEventListener(\"click\", this._fullscreenClick);\n if (location.hash === `#livesample_fullscreen=${this.liveId}`) {\n this._openFullscreen();\n }\n }\n\n render() {\n return html`\n <div class=\"code-example\">\n <div class=\"example-header\">\n ${this.breakoutLink\n ? html`<mdn-button\n variant=\"secondary\"\n href=${this.breakoutLink}\n target=\"_blank\"\n rel=\"opener\"\n aria-label=${this.l10n(\"example-play-button-title\")}\n title=${this.l10n(\"example-play-button-title\")}\n >${this.l10n(\"example-play-button-label\")}</mdn-button\n >`\n : nothing}\n </div>\n <mdn-play-runner\n @mdn-play-runner-src=${this._runnerSrcUpdated}\n .code=${this.code}\n .allow=${this.allow}\n .sandbox=${[\n ...new Set([\"allow-modals\", ...(this.sandbox?.split(\" \") || [])]),\n ].join(\" \")}\n .srcPrefix=${this.srcPrefix}\n permalink\n style=${styleMap({\n height: this.height\n ? `${this.height}${/[0-9]$/.test(this.height) ? \"px\" : \"\"}`\n : undefined,\n })}\n ></mdn-play-runner>\n </div>\n `;\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener(\"click\", this._fullscreenClick);\n }\n}\n\ncustomElements.define(\"mdn-live-sample-result\", MDNLiveSampleResult);\n","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=o=>o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","import{nothing as r}from\"../lit-html.js\";import{directive as t,Directive as e}from\"../directive.js\";import{setCommittedValue as s}from\"../directive-helpers.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const i=t(class extends e{constructor(){super(...arguments),this.key=r}render(r,t){return this.key=r,t}update(r,[t,e]){return t!==this.key&&(s(r),this.key=t),e}});export{i as keyed};\n//# sourceMappingURL=keyed.js.map\n"],"names":["MDNLiveSampleResult","Object","location","e","HTMLAnchorElement","URL","document","n","Set","s","customElements","arguments","t"],"mappings":";+NAMI,EAA0B,IAA4B,KAC1D,EAAwB,CAAC,CAAC,GAAiC,EAC3D,EAAwB,CAAC,CAAC,GAAiC,EAE3D,EAAwB,IAAI,CAAC,CAAC,EAAO,EAAE,CAAE,yIAA0I,GAAG,EAEtL,MAAe,SAAI,CAAC,EAAwB,QAAQ,GAAG,sJCDhD,IAAMA,oBAAN,MAAMA,2BAA4B,QAAU,IAAU,EAC3D,OAAO,OAAS,GAAM,AAAC,AAEvB,QAAO,WAAa,CAClB,OAAQ,CAAE,UAAW,SAAU,EAC/B,KAAM,CAAE,KAAMC,MAAO,EACrB,QAAS,CAAC,EACV,QAAS,CAAC,EACV,UAAW,CAAE,UAAW,YAAa,EACrC,OAAQ,CAAC,EACT,aAAc,CAAE,M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AAO,CAAC,CAACC,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,EAAEA,CAAC,CAAC,OAAO,CAAC,CAAC,CAACA,EAAE,EAAE,CAAC,CAAC,OAAOA,IAAI,IAAI,CAAC,GAAG,EAAG,UAAE,GAAG,IAAI,CAAC,GAAG,CAACA,CAAAA,EAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const __webpack_id__="9914";export const __webpack_ids__=["9914"];export const __webpack_modules__={10632:function(e,t,s){s.d(t,{A:()=>l});var a=s(63819),i=s(31601),n=s.n(i),r=s(76314),o=s.n(r)()(n());o.push([e.id,"iframe{border:none;box-sizing:initial;height:100%;width:100%}",""]);let l=(0,a.AH)([o.toString()])},86129:function(e,t,s){s.r(t),s.d(t,{MDNPlayRunner:()=>MDNPlayRunner});var a=s(64889),i=s(63819),n=s(62963),r=s(70209),o=s(69392),l=s(93957),c=s(36728),d=s(45842),h=s(10632);let MDNPlayRunner=class MDNPlayRunner extends i.WF{static ssr=!1;static properties={code:{type:Object},defaults:{type:String},srcPrefix:{type:String,attribute:"src-prefix"},allow:{type:String},sandbox:{type:String},permalink:{type:Boolean},_src:{state:!0}};static styles=h.A;constructor(){super(),this.theme=new l.W(this),this.code=void 0,this.defaults=void 0,this.srcPrefix=void 0,this.allow=void 0,this.sandbox=void 0,this.permalink=!1,this._uuid=crypto.randomUUID(),this._subdomain="",this.ready=new Promise(e=>{this._resolveReady=()=>e(!0)}),this._src="about:blank"}_iframe=(0,o._)();_onMessage({data:{typ:e,prop:t,args:s,uuid:a},origin:i}){a||(a=new URL(i,"https://example.com").hostname.split(".")[0]),a===this._subdomain&&("console"===e?this.dispatchEvent(new CustomEvent("console",{bubbles:!0,composed:!0,detail:{prop:t,args:s}})):"ready"===e&&this._resolveReady())}_updateSrc=new a.YZ(this,{args:()=>[this.code,this.defaults,this.theme.value,this.srcPrefix,this.permalink],task:async([e,t,s,a,i],{signal:n})=>{if(e&&e.js&&e.wat){let t=await u(e.wat);e.js=e.js.replace("{%wasm-url%}",t)}let{state:r,hash:o}=await (0,d.$)(JSON.stringify({html:e?.html||"",css:e?.css||"",js:e?.js||"",defaults:t,theme:s})),l=(a||"").replace(/\/$/,"");n.throwIfAborted();let h=i?o:this._uuid,p=new URL(`${l}/runner.html`,c.sR?location.origin.replace(c.I.toString(),c.mR.toString()):`${location.protocol}//${h}.${c.tf}`);p.searchParams.set("uuid",h),p.searchParams.set("state",r),this._subdomain=h,this._src=p.href,this.dispatchEvent(new CustomEvent("mdn-play-runner-src",{bubbles:!0,composed:!0,detail:p.href}))}});connectedCallback(){super.connectedCallback(),this._onMessage=this._onMessage.bind(this),window.addEventListener("message",this._onMessage)}async postMessage(e){await this.ready,this._iframe.value?.contentWindow?.postMessage(e,"*")}render(){return(0,r.D)(this._src,(0,i.qy)`
|
|
2
|
+
<iframe
|
|
3
|
+
${(0,o.K)(this._iframe)}
|
|
4
|
+
src=${this._src}
|
|
5
|
+
title="runner"
|
|
6
|
+
allow=${(0,n.J)(this.allow)}
|
|
7
|
+
sandbox=${[...new Set(["allow-scripts","allow-same-origin","allow-forms",...this.sandbox?.split(" ")||[]])].join(" ")}
|
|
8
|
+
aria-live="polite"
|
|
9
|
+
></iframe>
|
|
10
|
+
`)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("message",this._onMessage)}};async function u(e){let{default:t,watify:a}=await s.e("7185").then(s.bind(s,12456));await t();let i=a(e);return`data:application/wasm;base64,${btoa(Array.from(i,e=>String.fromCodePoint(e)).join(""))}`}customElements.define("mdn-play-runner",MDNPlayRunner)},45842:function(e,t,s){async function a(e){let t=new Blob([e]),s=new CompressionStream("deflate-raw"),a=new Response(t.stream().pipeThrough(s)).arrayBuffer(),i=await a,n=[...new Uint8Array(await globalThis.crypto.subtle.digest("SHA-256",i))].slice(0,20).map(e=>e.toString(16).padStart(2,"0")).join("");return{state:btoa(Array.from(new Uint8Array(i),e=>String.fromCodePoint(e)).join("")),hash:n}}async function i(e){if(!e)return{state:null,hash:null};let t=function(e){let t=atob(e),s=t.length,a=new Uint8Array(s);for(let e=0;e<s;e++)a[e]=t.charCodeAt(e);return a.buffer}(e),s=[...new Uint8Array(await crypto.subtle.digest("SHA-256",t))].slice(0,20).map(e=>e.toString(16).padStart(2,"0")).join(""),a=new DecompressionStream("deflate-raw"),i=new Response(new Blob([t]).stream().pipeThrough(a)).arrayBuffer();return{state:new TextDecoder().decode(await i),hash:s}}s.d(t,{$:()=>a,p:()=>i})}};
|
|
11
|
+
//# sourceMappingURL=9914.021220acc0d3e777.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"9914.021220acc0d3e777.js","sources":["webpack://@mdn/fred/./components/play-runner/element.css","webpack://@mdn/fred/./components/play-runner/element.js","webpack://@mdn/fred/./components/playground/utils.js"],"sourcesContent":["import { css } from \"lit\";\n// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `iframe{border:none;box-sizing:initial;height:100%;width:100%}`, \"\"]);\n// Exports\nexport default css([___CSS_LOADER_EXPORT___.toString()]);\n","import { Task } from \"@lit/task\";\nimport { LitElement, html } from \"lit\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { keyed } from \"lit/directives/keyed.js\";\nimport { createRef, ref } from \"lit/directives/ref.js\";\n\nimport { ThemeController } from \"../color-theme/controller.js\";\nimport {\n PLAYGROUND_BASE_HOST,\n PLAYGROUND_LOCAL,\n PLAYGROUND_PORT,\n PORT,\n} from \"../env/index.js\";\nimport { compressAndBase64Encode } from \"../playground/utils.js\";\n\nimport styles from \"./element.css?lit\";\n\n/**\n * @import { RunnerDefaults } from \"./types.js\"\n * @import { VConsole } from \"../play-console/types.js\"\n * @import { Ref } from \"lit/directives/ref.js\";\n */\n\nexport class MDNPlayRunner extends LitElement {\n static ssr = false;\n\n static properties = {\n code: { type: Object },\n defaults: { type: String },\n srcPrefix: { type: String, attribute: \"src-prefix\" },\n allow: { type: String },\n sandbox: { type: String },\n permalink: { type: Boolean },\n _src: { state: true },\n };\n\n static styles = styles;\n\n constructor() {\n super();\n this.theme = new ThemeController(this);\n /** @type {Record<string, string> | undefined} */\n this.code = undefined;\n /** @type {RunnerDefaults | undefined} */\n this.defaults = undefined;\n /** @type {string | undefined} */\n this.srcPrefix = undefined;\n /** @type {string | undefined} */\n this.allow = undefined;\n /** @type {string | undefined} */\n this.sandbox = undefined;\n /** @type {boolean} */\n this.permalink = false;\n /** @type {string} */\n this._uuid = crypto.randomUUID();\n /** @type {string} */\n this._subdomain = \"\";\n /** @type {Promise<true>} */\n this.ready = new Promise((resolve) => {\n this._resolveReady = () => resolve(true);\n });\n this._src = \"about:blank\";\n }\n\n /** @type {Ref<HTMLIFrameElement>} */\n _iframe = createRef();\n\n /** @param {MessageEvent} e */\n _onMessage({ data: { typ, prop, args, uuid }, origin }) {\n if (!uuid) {\n uuid = new URL(origin, \"https://example.com\").hostname.split(\".\")[0];\n }\n if (uuid !== this._subdomain) {\n return;\n }\n if (typ === \"console\") {\n /** @type {VConsole} */\n const detail = { prop, args };\n this.dispatchEvent(\n new CustomEvent(\"console\", { bubbles: true, composed: true, detail }),\n );\n } else if (typ === \"ready\") {\n this._resolveReady();\n }\n }\n\n _updateSrc = new Task(this, {\n args: () =>\n /** @type {const} */ ([\n this.code,\n this.defaults,\n this.theme.value,\n this.srcPrefix,\n this.permalink,\n ]),\n task: async ([code, defaults, theme, srcPrefix, permalink], { signal }) => {\n if (code && code.js && code.wat) {\n const watUrl = await compileAndEncodeWatToDataUrl(code.wat);\n code.js = code.js.replace(\"{%wasm-url%}\", watUrl);\n }\n const { state, hash } = await compressAndBase64Encode(\n JSON.stringify({\n html: code?.html || \"\",\n css: code?.css || \"\",\n js: code?.js || \"\",\n defaults: defaults,\n theme: theme,\n }),\n );\n const prefix = (srcPrefix || \"\").replace(/\\/$/, \"\");\n signal.throwIfAborted();\n const subdomain = permalink ? hash : this._uuid;\n const url = new URL(\n `${prefix}/runner.html`,\n PLAYGROUND_LOCAL\n ? location.origin.replace(PORT.toString(), PLAYGROUND_PORT.toString())\n : `${location.protocol}//${subdomain}.${PLAYGROUND_BASE_HOST}`,\n );\n // pass the uuid for postMessage isolation\n url.searchParams.set(\"uuid\", subdomain);\n url.searchParams.set(\"state\", state);\n this._subdomain = subdomain;\n this._src = url.href;\n this.dispatchEvent(\n new CustomEvent(\"mdn-play-runner-src\", {\n bubbles: true,\n composed: true,\n detail: url.href,\n }),\n );\n },\n });\n\n connectedCallback() {\n super.connectedCallback();\n this._onMessage = this._onMessage.bind(this);\n window.addEventListener(\"message\", this._onMessage);\n }\n\n /** @param {any} message */\n async postMessage(message) {\n await this.ready;\n this._iframe.value?.contentWindow?.postMessage(message, \"*\");\n }\n\n render() {\n // use `keyed` to replace the iframe when src updates\n // this ensures we don't add to browser history\n return keyed(\n this._src,\n html`\n <iframe\n ${ref(this._iframe)}\n src=${this._src}\n title=\"runner\"\n allow=${ifDefined(this.allow)}\n sandbox=${[\n ...new Set([\n \"allow-scripts\",\n \"allow-same-origin\",\n \"allow-forms\",\n ...(this.sandbox?.split(\" \") || []),\n ]),\n ].join(\" \")}\n aria-live=\"polite\"\n ></iframe>\n `,\n );\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener(\"message\", this._onMessage);\n }\n}\n\n/**\n * Converts a Uint8Array to a base64 encoded string\n * @param {Uint8Array} bytes - The array of bytes to convert\n * @returns {string} The base64 encoded string representation of the input bytes\n */\nfunction uInt8ArrayToBase64(bytes) {\n const binString = Array.from(bytes, (byte) =>\n String.fromCodePoint(byte),\n ).join(\"\");\n return btoa(binString);\n}\n\n/**\n * compiles the wat code to wasm\n * @param {string} wat\n * @returns {Promise<string>} a data-url with the compiled wasm, base64 encoded\n */\nasync function compileAndEncodeWatToDataUrl(wat) {\n const { default: init, watify } = await import(\"@mdn/watify\");\n await init();\n const binary = watify(wat);\n const b64 = `data:application/wasm;base64,${uInt8ArrayToBase64(binary)}`;\n return b64;\n}\n\ncustomElements.define(\"mdn-play-runner\", MDNPlayRunner);\n","// import { PLAYGROUND_BASE_HOST } from \"../env\";\n\n// /**\n// * @import { EditorContent } from \"./types.js\";\n// */\n\n// /**\n// * @param {EditorContent} code\n// * @returns {string}\n// */\n// export function codeToMarkdown(code) {\n// const parts = [];\n// if (code.html) {\n// parts.push([\"```html\", code.html, \"```\"].join(\"\\n\"));\n// }\n// if (code.css) {\n// parts.push([\"```css\", code.css, \"```\"].join(\"\\n\"));\n// }\n// if (code.js) {\n// parts.push([\"```js\", code.js, \"```\"].join(\"\\n\"));\n// }\n// return parts.join(\"\\n\\n\");\n// }\n\n// /**\n// * @param {HTMLIFrameElement | null} iframe\n// * @param {EditorContent | null} editorContent\n// * @param {boolean} fullscreen\n// */\n// export async function initPlayIframe(\n// iframe,\n// editorContent,\n// fullscreen = false\n// ) {\n// if (!iframe || !editorContent) {\n// return;\n// }\n// const { state, hash } = await compressAndBase64Encode(\n// JSON.stringify(editorContent)\n// );\n// const path = iframe.getAttribute(\"data-live-path\");\n// const url = new URL(\n// `${path || \"\"}${path?.endsWith(\"/\") ? \"\" : \"/\"}runner.html`,\n// window.location.origin\n// );\n// if (!window.location.hostname.endsWith(\"localhost\")) {\n// const host = PLAYGROUND_BASE_HOST.startsWith(\"localhost\")\n// ? PLAYGROUND_BASE_HOST\n// : `${hash}.${PLAYGROUND_BASE_HOST}`;\n// url.port = \"\";\n// url.host = host;\n// }\n// url.search = \"\";\n// url.searchParams.set(\"state\", state);\n// iframe.src = url.href;\n// if (fullscreen) {\n// const urlWithoutHash = new URL(window.location.href);\n// urlWithoutHash.hash = \"\";\n// window.history.replaceState(null, \"\", urlWithoutHash);\n// window.location.href = url.href;\n// }\n// }\n\n/**\n * @param {ArrayBuffer} bytes\n */\nfunction bytesToBase64(bytes) {\n const binString = Array.from(new Uint8Array(bytes), (byte) =>\n String.fromCodePoint(byte),\n ).join(\"\");\n return btoa(binString);\n}\n\n/**\n * @param {string} inputString\n */\nexport async function compressAndBase64Encode(inputString) {\n const inputArray = new Blob([inputString]);\n\n const compressionStream = new CompressionStream(\"deflate-raw\");\n\n const compressedStream = new Response(\n inputArray.stream().pipeThrough(compressionStream),\n ).arrayBuffer();\n\n const compressed = await compressedStream;\n const hashBuffer = await globalThis.crypto.subtle.digest(\n \"SHA-256\",\n compressed,\n );\n const hashArray = [...new Uint8Array(hashBuffer)].slice(0, 20);\n const hash = hashArray.map((b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n const state = bytesToBase64(compressed);\n\n return { state, hash };\n}\n\n/**\n * @param {string} base64\n * @returns {ArrayBuffer}\n */\nfunction base64ToBytes(base64) {\n const binString = atob(base64);\n const len = binString.length;\n const bytes = new Uint8Array(len);\n for (let i = 0; i < len; i++) {\n // eslint-disable-next-line unicorn/prefer-code-point\n bytes[i] = binString.charCodeAt(i);\n }\n return bytes.buffer;\n}\n\n/**\n * This is the browser version of `libs/play/index.js`. Keep in sync!\n * @param {string} base64String\n */\nexport async function decompressFromBase64(base64String) {\n if (!base64String) {\n return { state: null, hash: null };\n }\n const bytes = base64ToBytes(base64String);\n const hashBuffer = await crypto.subtle.digest(\"SHA-256\", bytes);\n const hashArray = [...new Uint8Array(hashBuffer)].slice(0, 20);\n const hash = hashArray.map((b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n\n const decompressionStream = new DecompressionStream(\"deflate-raw\");\n\n const decompressedStream = new Response(\n new Blob([bytes]).stream().pipeThrough(decompressionStream),\n ).arrayBuffer();\n\n const state = new TextDecoder().decode(await decompressedStream);\n return { state, hash };\n}\n"],"names":["MDNPlayRunner","Object","String","Boolean","crypto","Promise","URL","CustomEvent","JSON","location","window","Set","btoa","Array","customElements","Blob","CompressionStream","Response","Uint8Array","globalThis","atob","DecompressionStream","TextDecoder"],"mappings":"gMAII,EAA0B,A,SAA4B,KAE1D,EAAwB,IAAI,CAAC,CAAC,EAAO,EAAE,CAAE,gEAAiE,GAAG,EAE7G,MAAe,SAAI,CAAC,EAAwB,QAAQ,GAAG,C,+KCehD,IAAMA,cAAN,MAAMA,sBAAsB,IAAU,CAC3C,OAAO,IAAM,EAAM,AAEnB,QAAO,WAAa,CAClB,KAAM,CAAE,KAAMC,MAAO,EACrB,SAAU,CAAE,KAAMC,MAAO,EACzB,UAAW,CAAE,KAAMA,OAAQ,UAAW,YAAa,EACnD,MAAO,CAAE,KAAMA,MAAO,EACtB,QAAS,CAAE,KAAMA,MAAO,EACxB,UAAW,CAAE,KAAMC,OAAQ,EAC3B,KAAM,CAAE,MAAO,EAAK,CACtB,CAAE,AAEF,QAAO,OAAS,GAAM,AAAC,AAEvB,cAAc,CACZ,KAAK,GACL,IAAI,CAAC,KAAK,CAAG,IAAI,GAAe,CAAC,IAAI,EAErC,IAAI,CAAC,IAAI,CAAG,OAEZ,IAAI,CAAC,QAAQ,CAAG,OAEhB,IAAI,CAAC,SAAS,CAAG,OAEjB,IAAI,CAAC,KAAK,CAAG,OAEb,IAAI,CAAC,OAAO,CAAG,OAEf,IAAI,CAAC,SAAS,CAAG,GAEjB,IAAI,CAAC,KAAK,CAAGC,OAAO,UAAU,GAE9B,IAAI,CAAC,UAAU,CAAG,GAElB,IAAI,CAAC,KAAK,CAAG,IAAIC,QAAQ,AAAC,IACxB,IAAI,CAAC,aAAa,CAAG,IAAM,EAAQ,GACrC,GACA,IAAI,CAAC,IAAI,CAAG,aACd,CAGA,QAAU,SAAY,AAGtB,YAAW,CAAE,KAAM,CAAE,KAAG,CAAE,MAAI,CAAE,MAAI,CAAE,MAAI,CAAE,CAAE,QAAM,CAAE,CAAE,CAClD,AAAC,GACH,GAAO,IAAIC,IAA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,KAAK,CAAC,EAAM,EAAE,MAAM,GAAG,WAAW,CAAC,IACvC,WAAW,GAGb,MAAO,CAAE,MADK,IAAIO,cAAc,MAAM,CAAC,MAAM,GAC7B,MAAK,CACvB,C"}
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
/*! For license information please see index.0f1f5c05b3c9458b.js.LICENSE.txt */
|
|
2
|
+
export const __webpack_id__="8410";export const __webpack_ids__=["8410"];export const __webpack_modules__={27887:function(e,t,n){n.d(t,{A:()=>p});var a=n(63819),o=n(31601),r=n.n(o),s=n(76314),i=n.n(s),l=n(4417),c=n.n(l),d=new n.U(n(34473)),u=i()(r()),m=c()(d);u.push([e.id,`*,:after,:before{box-sizing:border-box}dialog{border:0;padding:0}@media (width > 1006px){dialog{background-color:var(--color-background-primary);border:1px solid var(--color-border-primary);border-radius:.5rem;font-size:var(--font-size-large);margin:calc(var(--sticky-header-height) + 1rem) auto 1rem;max-height:calc(100% - var(--sticky-header-height) - 2rem);width:calc(var(--layout-content-max) + 1rem)}dialog::backdrop{--csstools-light-dark-toggle-dee8eb9e-0:var(--csstools-color-scheme--light) var(--color-black-alpha-75);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background-color:var(--csstools-light-dark-toggle-dee8eb9e-0,var(--color-white-alpha-75))}@supports (color:light-dark(red,red)){dialog::backdrop{background-color:light-dark(var(--color-white-alpha-75),var(--color-black-alpha-75))}}}@media (width <= 1006px){dialog{font-size:var(--font-size-normal);height:100%;margin:0;max-height:100%;max-width:100%;width:100%}}dialog[open]{display:grid;grid-template-areas:"search close" "progress progress" "results results";grid-template-columns:1fr min-content;grid-template-rows:var(--navigation-height) min-content min-content}progress{grid-area:progress;margin:0 1rem .5rem}@media (width <= 1006px){progress{margin-inline:.3rem}}.close{font-size:1.37rem;grid-area:close}@media (width > 1006px){.close{display:none}}form{display:grid;gap:.5rem;grid-area:search;grid-template-columns:min-content 1fr;padding:1rem;place-items:center}@media (width <= 1006px){form{align-self:center;background-color:var(--color-background-primary);border:1px solid var(--color-border-primary);border-radius:.5rem;margin-left:.3rem;padding:.5rem}}form:before{background-color:var(--color-border-secondary);content:"";height:1em;-webkit-mask-image:url(${m});mask-image:url(${m});-webkit-mask-size:contain;mask-size:contain;width:1em}input{background-color:initial;border:none;font-size:inherit;margin:0;outline:none;padding:0;width:100%}input::placeholder{color:var(--color-text-secondary)}ul{grid-area:results;margin:0;overflow:auto;overscroll-behavior:contain;padding:0}ul:has(li){border-top:1px solid var(--color-border-primary)}li[data-selected]{background:var(--color-background-blue);border-color:var(--color-blue-50)}li{border-inline-start:2px solid #0000;list-style-type:none}li:not([data-selected]):hover{background-color:var(--color-background-secondary)}li>*{padding:.5rem 1.5rem;width:100%}a{color:var(--color-link-normal);display:grid;-webkit-text-decoration:none;text-decoration:none}a:visited{color:var(--color-link-visited)}.slug{color:var(--color-text-secondary);font-size:var(--font-size-small)}mark{background-color:var(--color-background-yellow);color:var(--color-text-primary)}`,""]);let p=(0,a.AH)([u.toString()])},37940:function(e,t,n){n.d(t,{A:()=>o});var a=n(63819);let o=(0,a.JW)`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M18 6 6 18M6 6l12 12"/></svg>`},47479:function(e,t,n){var a={"./code-example/element.js":["69208","3945","9963","7627","1595","993","3187"],"./dropdown/element.js":["1783","220","7948"],"./live-sample-result/element.js":["4225","3945","8427","9963","9478","9914","7627","6480"],"./observatory-tests-and-scores/element.js":["37538","1231"],"./play-runner/element.js":["86129","3945","9478","9914","9696"],"./search-button/element.js":["69817","2002"],"./survey/element.js":["6674","3945","9963","5124","3279"],"./ix-tab-wrapper/element.js":["56259","7072"],"./placement-sidebar/element.js":["43236","3945","8427","288","8797","2885","3733"],"./placement-hp-main/element.js":["9714","3945","8427","288","8797","2885","8607"],"./record-visit/element.js":["71373","3330","9566"],"./toggle-sidebar/element.js":["74540","9963","2860"],"./user-menu/element.js":["5265","9963","5124","1274"],"./interactive-example/element.js":["51851","3945","9379","9804","490","5745","2192","2936","6372","5123","9378","9963","9478","9914","3292","9679","7627","6536","1595","4091","993","7072","3122","6040"],"./copy-button/element.js":["2406","9963","1595","806"],"./observatory-comparison-table/element.js":["30077","7221","606"],"./sidebar-filter/element.js":["525","5534"],"./issues-table/element.js":["91423","3092"],"./scrim-inline/element.js":["1826","8427","2319"],"./switch/element.js":["89134","1363"],"./collection-save-button/element.js":["30931","9963","2190","1648"],"./contributor-list/element.js":["60642","479"],"./button/element.js":["99638","9963","5568"],"./homepage-search/element.js":["75509","1158"],"./modal/element.js":["53343","9963","2190"],"./color-theme/element.js":["23485","220","3200"],"./about-team-member/element.js":["7260","4781"],"./content-feedback/element.js":["21672","9963","603"],"./play-console/element.js":["75143","3292"],"./ix-tab/element.js":["11865","4091","3122"],"./observatory-header-link/element.js":["82767","7221","6452"],"./curriculum-tabs/element.js":["85804","3213"],"./placement-bottom/element.js":["64047","3945","8427","288","8797","2885","8036"],"./image-history/element.js":["69954","9935"],"./not-found/element.js":["11942","495","667"],"./placement-note/element.js":["55772","8797"],"./compat-table-lazy/element.js":["18526","5124","2308","451"],"./site-search/element.js":["30757","9963","4071"],"./placement-no/element.js":["10787","288"],"./play-controller/element.js":["99723","6536"],"./placement-top/element.js":["72135","3945","8427","288","8797","2885","3132"],"./observatory-form/element.js":["92691","3945","9963","8998","370"],"./observatory-results/element.js":["85324","9963","7221","220","8998","606","5019","6452","14","9837"],"./about-tabs/element.js":["49410","9519"],"./observatory-human-duration/element.js":["22061","7221","14"],"./playground/element.js":["75259","3945","9379","9804","490","5745","2192","2936","6372","5123","9963","9478","9914","3292","9679","6536","2190","9784"],"./ix-tab-panel/element.js":["20358","4091"],"./play-editor/element.js":["20002","9379","9804","490","5745","2192","2936","6372","5123","9478","9679"],"./themed-image/element.js":["10421","7462"],"./writer-open-editor/element.js":["91398","9963","8793"],"./progress-bar/element.js":["73589","8998"],"./compat-table/element.js":["30191","5124","2308"],"./login-button/element.js":["730","9963","8093"],"./observatory-rescan-button/element.js":["81512","9963","5019","7789"],"./recently-visited/element.js":["5877","3330","486"],"./language-always-redirect-button/element.js":["10860","4334","7741"],"./language-switcher/element.js":["82102","220","1363","495","4334","6465"],"./search-modal/element.js":["49818"],"./writer-reload/element.js":["7589","5446"]};function o(e){if(!n.o(a,e))return Promise.resolve().then(function(){var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=a[e],o=t[0];return Promise.all(t.slice(1).map(n.e)).then(function(){return n(o)})}o.keys=()=>Object.keys(a),o.id=47479,e.exports=o},34473:function(e,t,n){e.exports=n.p+"search.5dd31cbeea7d1af9.svg"},33098:function(){try{let t=document.querySelector(".baseline-indicator");function e(e){e?localStorage.setItem("baseline-indicator","open"):localStorage.removeItem("baseline-indicator")}t instanceof HTMLDetailsElement&&(t.addEventListener("toggle",()=>{e(t.open)}),e(t.open))}catch(e){console.warn("Unable to attach to baseline indicator",e)}},36728:function(e,t,n){n.d(t,{i7:()=>x,iW:()=>y,tf:()=>l,P0:()=>h,I:()=>d,mR:()=>u,_0:()=>f,Q:()=>w,sR:()=>c,vQ:()=>m,kv:()=>p,Sl:()=>g,g_:()=>b,QD:()=>v});let a=[],o=r("RUNTIME_ENV",!0);function r(e,t,n){try{return!!JSON.parse(i(e,n)||JSON.stringify(t))}catch{return t}}function s(e,t,n){let a=i(e,n),o=a?Number.parseInt(a,10):t;return Number.isNaN(o)?t:o}function i(e,t={}){let{runtime:n}={runtime:!1,...t},r=`FRED_${e}`;return n&&o?(a.push(r),globalThis.process?.env[r]||i(e)):({FRED_RUNTIME_ENV:"true",FRED_PLAYGROUND_LOCAL:"false",FRED_LEGACY:"true"})[r]}let l=i("PLAYGROUND_BASE_HOST",void 0)||"mdnplay.dev",c=r("PLAYGROUND_LOCAL",!1,{runtime:!0}),d=s("PORT",3e3,{runtime:!0}),u=s("PLAYGROUND_PORT",3001,{runtime:!0}),m=i("FXA_SIGNIN_URL",void 0)||"/users/fxa/login/authenticate/",p=i("FXA_SIGNOUT_URL",void 0)||"/users/fxa/login/logout/",h=r("GA_ENABLED",!1),g=i("GA_MEASUREMENT_ID",void 0)||"",f=r("GLEAN_ENABLED",!1),b=i("GLEAN_CHANNEL",void 0)||"dev",x=r("GLEAN_DEBUG",!1);r("ROBOTS_GLOBAL_ALLOW",!0);let v=r("WRITER_MODE",!1,{runtime:!0}),y=i("BCD_BASE_URL",void 0)||"https://bcd.developer.mozilla.org",w=i("OBSERVATORY_API_URL",void 0)||"https://observatory-api.mdn.mozilla.net"},99217:function(){let e=document.querySelector('[aria-controls="navigation__popup"]'),t=document.querySelector(".navigation");e instanceof HTMLElement&&t instanceof HTMLElement&&e.addEventListener("click",()=>{let n=("true"!==t.dataset.open).toString();t.dataset.open=n,e.setAttribute("aria-expanded",n)})},49818:function(e,t,n){n.r(t),n.d(t,{MDNSearchModal:()=>MDNSearchModal,splitQuery:()=>d});var a=n(64889),o=n(63819),r=n(86484),s=n(39943),i=n(90528),l=n(37940),c=n(27887);let MDNSearchModal=class MDNSearchModal extends(0,r.J)(o.WF){static ssr=!1;static styles=c.A;static properties={_index:{state:!0},_query:{state:!0},_selected:{state:!0},_shiftFocus:{state:!0}};constructor(){super(),this._index=void 0,this._query="",this._selected=0,this._shiftFocus=!1,this._hasEngaged=!1}async _loadIndex(){this._index||(this._index=this._fetchIndex())}async _fetchIndex(){let e=await fetch(`/${this.locale}/search-index.json`),t=await e.json();return{flex:t.map(({title:e,url:t},n)=>({index:n,title:e.toLowerCase(),slugTail:t.split("/").pop()?.toLowerCase()||""})),items:t}}showModal(){this._loadIndex(),this.shadowRoot?.querySelector("dialog")?.showModal(),this.shadowRoot?.querySelector("input")?.select()}_input({inputType:e,target:t}){t instanceof HTMLInputElement&&(this._query=t.value,!this._hasEngaged&&e.startsWith("insert")&&(this._hasEngaged=!0,(0,s.w)(`quick-search-change: ${"insertFromPaste"===e?"paste":"type"}`)))}_keydown(e){switch(e.key){case"ArrowUp":e.preventDefault(),this._select(this._selected-1);break;case"ArrowDown":e.preventDefault(),this._select(this._selected+1);break;case"Enter":{let{ctrlKey:t,shiftKey:n,altKey:a,metaKey:o}=e,r=this._getSelectedItem();r instanceof HTMLElement&&(e.preventDefault(),r.dispatchEvent(new MouseEvent("click",{bubbles:!0,composed:!0,ctrlKey:t,shiftKey:n,altKey:a,metaKey:o})));break}default:return}}_getSelectedItem(){return this.shadowRoot?.querySelector("[data-selected] a")??null}_select(e){let t=(this._queryIndex.value?.length||0)+1,n=e%t;this._selected=n<0?t+e:n,setTimeout(()=>{let e=this._getSelectedItem();e instanceof HTMLElement&&e.scrollIntoView({behavior:"smooth",block:"nearest"})},0)}_submit(e){e.preventDefault();let t=this._getSelectedItem();t instanceof HTMLElement&&t.click()}_focus({target:e}){if(e instanceof HTMLElement){let t=e.closest("[data-result]");if(t instanceof HTMLElement){let e=Number.parseInt(t.dataset.result||"NaN",10);Number.isNaN(e)||(this._selected=e,this._shiftFocus=!0)}else this._shiftFocus=!1}}_globalKeydown(e){let t=e.composedPath()?.[0]||e.target;if(t instanceof HTMLElement&&(["TEXTAREA","INPUT"].includes(t.tagName)||t.isContentEditable))return;let n=globalThis.getSelection()?.toString(),a=e.key,o=e.ctrlKey||e.metaKey,r="/"===a&&!o,i="k"===a&&o&&!e.shiftKey;(r||i)&&(e.preventDefault(),(0,s.w)(`quick-search-open: keyboard -> ${r?"slash":"ctrl-k"}`),this.showModal(),n&&(this._query=n,this._hasEngaged||(this._hasEngaged=!0,(0,s.w)("quick-search-change: selection"))))}_queryIndex=new a.YZ(this,{args:()=>[this._index,this._query],task:async([e,t])=>{if(e&&t){var n,a;let o,r;return n=t,a=await e,o=n.toLowerCase().trim(),r=d(n),a.flex.filter(({title:e})=>r.every(t=>e.includes(t))).map(({index:e,title:t,slugTail:n})=>[Number([t,n].includes(o)),e]).sort(([e],[t])=>t-e).map(([e,t])=>t).slice(0,10).map(e=>e&&(a.items||[])[e]).filter(Boolean)}}});_close(){this.shadowRoot?.querySelector("dialog")?.close()}connectedCallback(){super.connectedCallback(),this._globalKeydown=this._globalKeydown.bind(this),document.addEventListener("keydown",this._globalKeydown),this._loadIndex=this._loadIndex.bind(this),this.renderRoot.addEventListener("mouseover",this._loadIndex)}disconnectedCallback(){super.disconnectedCallback(),this.renderRoot.removeEventListener("mouseover",this._loadIndex),document.removeEventListener("keydown",this._globalKeydown)}_renderLoadingSearchIndex(){return(0,o.qy)`<progress
|
|
3
|
+
aria-label=${this.l10n`Loading search index…`}
|
|
4
|
+
></progress>`}render(){let e=this._queryIndex.value?.length||0,t=this._query?`/${this.locale}/search?${new URLSearchParams({q:this._query})}`:null;return(0,o.qy)`
|
|
5
|
+
<dialog @keydown=${this._keydown} @focusin=${this._focus} closedby="any">
|
|
6
|
+
<form
|
|
7
|
+
method="get"
|
|
8
|
+
action=${`/${this.locale}/search`}
|
|
9
|
+
@submit=${this._submit}
|
|
10
|
+
>
|
|
11
|
+
<input
|
|
12
|
+
type="search"
|
|
13
|
+
name="q"
|
|
14
|
+
.value=${this._query}
|
|
15
|
+
autofocus
|
|
16
|
+
@input=${this._input}
|
|
17
|
+
placeholder=${this.l10n`Search`}
|
|
18
|
+
aria-label=${this.l10n`Search`}
|
|
19
|
+
/>
|
|
20
|
+
</form>
|
|
21
|
+
<mdn-button
|
|
22
|
+
class="close"
|
|
23
|
+
variant="plain"
|
|
24
|
+
icon-only
|
|
25
|
+
.icon=${l.A}
|
|
26
|
+
@click=${this._close}
|
|
27
|
+
>${this.l10n`Exit search`}</mdn-button
|
|
28
|
+
>
|
|
29
|
+
${this._queryIndex.render({initial:this._renderLoadingSearchIndex.bind(this),pending:this._renderLoadingSearchIndex.bind(this)})}
|
|
30
|
+
<ul>
|
|
31
|
+
${this._queryIndex.render({complete:e=>e?.map(({title:e,url:t},n)=>{var a;let r,s;return(0,o.qy)`
|
|
32
|
+
<li ?data-selected=${this._selected===n} data-result=${n}>
|
|
33
|
+
<a
|
|
34
|
+
href=${t}
|
|
35
|
+
data-glean-id=${`quick-search: results[${1+n}] -> ${this._query} -> ${t}`}
|
|
36
|
+
><span class="slug"
|
|
37
|
+
>${(0,i.o)(t,this.locale)}</span
|
|
38
|
+
>
|
|
39
|
+
<span class="title"
|
|
40
|
+
>${a=e,s=(r=d(this._query)).map(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)).map(e=>`(${e})`).join("|"),a.split(RegExp(s,"gi")).filter(Boolean).map(e=>r.includes(e.toLowerCase())?(0,o.qy)`<mark>${e}</mark>`:e)}</span
|
|
41
|
+
></a
|
|
42
|
+
>
|
|
43
|
+
</li>
|
|
44
|
+
`})})}
|
|
45
|
+
${t?(0,o.qy)`<li
|
|
46
|
+
?data-selected=${this._selected===e}
|
|
47
|
+
data-result=${e}
|
|
48
|
+
>
|
|
49
|
+
<a
|
|
50
|
+
href=${t}
|
|
51
|
+
data-glean-id=${`quick-search: site-search -> ${this._query}`}
|
|
52
|
+
><span class="title"
|
|
53
|
+
>${this.l10n.raw({id:"search-modal-site-search",args:{query:this._query},elements:{query:{tag:"code"}}})}</span
|
|
54
|
+
></a
|
|
55
|
+
>
|
|
56
|
+
</li>`:o.s6}
|
|
57
|
+
</ul>
|
|
58
|
+
</dialog>
|
|
59
|
+
`}updated(){if(this._shiftFocus){let e=this._getSelectedItem();e instanceof HTMLElement&&e.focus()}}};function d(e){return(e=e.trim().toLowerCase()).startsWith(".")||e.endsWith(".")?e.split(/[ ,]+/):e.split(/[ ,.]+/)}customElements.define("mdn-search-modal",MDNSearchModal)},93526:function(e,t,n){let a;n.d(t,{L:()=>i});var o=n(36728);let r={country:"United States",country_iso:"US"},s={username:null,isAuthenticated:!1,avatarUrl:null,isSubscriber:!1,subscriptionType:null,email:null,geo:r,settings:null};function i(){return o.QD?new Promise(()=>{}):(a||(a=l().catch(e=>(console.error(e),s))),a)}async function l(){let e=await fetch("/api/v1/whoami");if(!e.ok)throw Error(e.statusText);try{let t=await e.json(),n=t?.settings?{aiHelpHistory:"boolean"==typeof t.settings?.ai_help_history?t.settings.ai_help_history:null,noAds:t.settings?.no_ads??null}:s.settings;return c.noAds=n?.noAds||!1,{username:t.username??s.username,isAuthenticated:t.is_authenticated??s.isAuthenticated,avatarUrl:t.avatar_url??s.avatarUrl,isSubscriber:t.is_subscriber??s.isSubscriber,subscriptionType:"core"===t.subscription_type?"mdn_core":t.subscription_type??s.subscriptionType,email:t.email??s.email,geo:{country:(t.geo&&t.geo.country)??r.country,country_iso:(t.geo&&t.geo.country_iso)??r.country_iso},settings:n}}catch{throw Error(e.statusText)}}let c={set noAds(value){value?globalThis.localStorage.setItem("nop","yes"):globalThis.localStorage.removeItem("nop")},get noAds(){return globalThis.localStorage?.getItem?.("nop")==="yes"}}},31051:function(e,t,n){n.a(e,async function(e,t){try{n(4591),n(68069),n(73013),n(64152),n(23929),n(64989),n(33098),n(64531),n(99217),n(41600);var a=n(42732),o=n(43531);n(7461);var r=n(99229),s=e([a,o,r]);[a,o,r]=s.then?(await s)():s,t()}catch(e){t(e)}})},42732:function(e,t,n){n.a(e,async function(e,t){try{for(let e of document.querySelectorAll('div.code-example pre:not(.hidden):not([class*="live-sample"]):not([class*="interactive-example"])')){let{upgradePre:t}=await Promise.all([n.e("3945"),n.e("9963"),n.e("7627"),n.e("1595"),n.e("993"),n.e("3187")]).then(n.bind(n,69208));t(e)}t()}catch(e){t(e)}},1)},23929:function(){"closedBy"in HTMLDialogElement.prototype||addEventListener("click",e=>{let t=e.composedPath()[0];if(t instanceof HTMLDialogElement&&"any"===t.getAttribute("closedby")){let n=t.getBoundingClientRect(),{clientX:a,clientY:o}=e;n.top<=o&&o<=n.bottom&&n.left<=a&&a<=n.right||t.close()}})},64152:function(e,t,n){let a,o,r,s,i;var l=n(36728),c=n(93772);if(l.P0&&l.Sl&&!(0,c.G)()&&(a=navigator.doNotTrack||globalThis.doNotTrack||navigator.msDoNotTrack,r=(o=navigator.userAgent).match(/Firefox\/(\d+)/),s=/MSIE|Trident/i.test(o),i=o.match(/Windows.+?(?=;)/g),s&&"function"!=typeof Array.prototype.indexOf||"Enabled"!==(a=r&&32>Number.parseInt(r[1]||"0",10)||s&&i&&["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3"].includes(i.toString())?"Unspecified":({0:"Disabled",1:"Enabled"})[a]||"Unspecified"))){function d(...e){globalThis.dataLayer.push(e)}globalThis.dataLayer=globalThis.dataLayer||[],d("js",new Date),d("config",l.Sl,{anonymize_ip:!0});let e=document.createElement("script");e.async=!0,e.src=`https://www.googletagmanager.com/gtag/js?id=${encodeURIComponent(l.Sl)}`,document.head.append(e)}},73013:function(e,t,n){var a=n(32890),o=n(36728),r=n(39943);let s=!(0,n(93772).G)()&&o._0;o.i7&&(a.Ay.setDebugViewTag("mdn-dev"),a.Ay.setLogPings(!0)),a.Ay.initialize("mdn-fred",s,{enableAutoPageLoadEvents:!0,enableAutoElementClickEvents:!0,channel:o.g_}),document.addEventListener("click",e=>{let t=e.composedPath()?.[0];if(t!==e.target&&t instanceof Element){let e=t.closest("[data-glean-id]");if(e instanceof HTMLElement){let t=e.dataset.gleanId;t&&(0,r.w)(t)}}let n=t??e.target;if(n instanceof Element){let e=n.closest("a");e instanceof HTMLAnchorElement&&e.href&&e.origin&&e.origin!==document.location.origin&&(0,r.w)(`external-link: ${e.href}`)}})},43531:function(e,t,n){n.a(e,async function(e,t){try{for(let e of document.querySelectorAll("iframe[data-live-id]"))if(e instanceof HTMLIFrameElement){let{liveId:t,livePath:a}=e.dataset;if(t){let o={},r=[],s=t.replaceAll(".",String.raw`\.`);for(let e of document.querySelectorAll(`.live-sample___${s}, .live-sample---${s}`)){let{MDNCodeExample:t,upgradePre:a}=await Promise.all([n.e("3945"),n.e("9963"),n.e("7627"),n.e("1595"),n.e("993"),n.e("3187")]).then(n.bind(n,69208)),s=e instanceof t?e:a(e);if(s){r.push(s);let{language:e,code:t}=s;o[e]?o[e]+=t:o[e]=t}}await Promise.all([n.e("3945"),n.e("8427"),n.e("9963"),n.e("9478"),n.e("9914"),n.e("7627"),n.e("6480")]).then(n.bind(n,4225));let i=document.createElement("mdn-live-sample-result");for(let n of(i.liveId=t,i.code=o,i.srcPrefix=a,i.allow=e.allow||void 0,i.sandbox=e.sandbox.toString(),i.height=e.height,e.closest(".code-example")?.replaceWith(i),r))n.liveSample||=i}}t()}catch(e){t(e)}},1)},64989:function(e,t,n){let a=new Set;for(let e of document.querySelectorAll("*")){let t=e.tagName.toLowerCase();if(t.startsWith("mdn-")||"interactive-example"===t){let e=t.replace("mdn-","");a.has(e)||(a.add(e),n(47479)(`./${e}/element.js`).catch(t=>{console.error(`couldn't load code for <${e}>: does the element's code not match the naming schema?`,t)}))}}},64531:function(){let e=document.querySelector(".left-sidebar"),t=e?.querySelector('[aria-current="page"]');e&&t instanceof HTMLElement&&e.scrollTo({top:t.offsetTop-window.innerHeight/4})},7461:function(e,t,n){var a=n(49818);let o=document.querySelector('.a11y-menu a[href="#search"]');if(o instanceof HTMLAnchorElement){let e=document.querySelector("#search");e instanceof a.MDNSearchModal?o.addEventListener("click",t=>{let{target:n}=t;n instanceof HTMLElement&&(n.blur(),t.preventDefault()),e.showModal()}):(console.error("MDNSearchModal not found!"),o.hidden=!0)}},41600:function(){for(let e of document.querySelectorAll(".generic-toc, .reference-toc, .document-toc, .blog-toc"))e instanceof HTMLElement&&function(e){let t=[...e.querySelectorAll("a")],n=new Map;for(let e of t.reverse()){let t=document.querySelector(`[id="${decodeURIComponent(e.hash).slice(1)}"]`);if(!t)continue;let a=t.closest("section");for(;a&&a instanceof HTMLElement&&!n.has(a);)n.set(a,e),a=a.nextElementSibling}let a=new WeakMap,o=new Set,r={threshold:0},s=document.querySelector("header");s instanceof HTMLElement&&(r.rootMargin=`-${s.clientHeight}px 0px 0px 0px`);let i=new IntersectionObserver(e=>{for(let{target:t,isIntersecting:r}of e){if(!(t instanceof HTMLElement))continue;if(!o.has(t))if(!r)continue;else o.add(t);let e=n.get(t);if(!e)continue;let s=(a.get(e)??0)+(r?1:-1);e.ariaCurrent=s>0?"true":null,a.set(e,s)}},r);for(let e of n.keys())i.observe(e)}(e)},99229:function(e,t,n){n.a(e,async function(e,t){try{var a=n(93526);try{let e=await (0,a.L)(),t=new Date(localStorage.getItem("next-ping")||0);if(navigator.sendBeacon&&e.isAuthenticated&&t<new Date){let e=new URLSearchParams;navigator.sendBeacon("/api/v1/ping",e);let t=new Date;t.setUTCDate(t.getUTCDate()+1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),localStorage.setItem("next-ping",t.toISOString())}}catch(e){console.error("Failed to send ping",e)}t()}catch(e){t(e)}},1)},86484:function(e,t,n){n.d(t,{J:()=>m});var a=n(24909),o=n(81233),r=n(58055);let s=`# TODO Use comments, see: https://firefox-source-docs.mozilla.org/l10n/fluent/review.html#comments
|
|
60
|
+
# TODO Consider using terms, see: https://firefox-source-docs.mozilla.org/l10n/fluent/review.html#terms and https://projectfluent.org/fluent/guide/references.html#message-references
|
|
61
|
+
|
|
62
|
+
article-footer-last-modified = This page was last modified on <time data-l10n-name="date">{ $date }</time> by <a data-l10n-name="contributors">MDN contributors</a>.
|
|
63
|
+
article-footer-source-title = Folder: { $folder } (Opens in a new tab)
|
|
64
|
+
|
|
65
|
+
baseline-asterisk = Some parts of this feature may have varying levels of support.
|
|
66
|
+
baseline-high-extra = This feature is well established and works across many devices and browser versions. It’s been available across browsers since { $date }.
|
|
67
|
+
baseline-low-extra = Since { $date }, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
|
|
68
|
+
baseline-not-extra = This feature is not Baseline because it does not work in some of the most widely-used browsers.
|
|
69
|
+
baseline-supported-in = Supported in { $browsers }
|
|
70
|
+
baseline-unsupported-in = Not widely supported in { $browsers }
|
|
71
|
+
baseline-supported-and-unsupported-in = Supported in { $supported }, but not widely supported in { $unsupported }
|
|
72
|
+
|
|
73
|
+
homepage-hero-title = Resources for Developers,<br> by Developers
|
|
74
|
+
homepage-hero-description = Documenting <a data-l10n-name="css">CSS</a>, <a data-l10n-name="html">HTML</a>, and <a data-l10n-name="js">JavaScript</a>, since 2005.
|
|
75
|
+
|
|
76
|
+
not-found-title = Page not found
|
|
77
|
+
not-found-description = Sorry, the page <code data-l10n-name="url">{ $url }</code> could not be found.
|
|
78
|
+
not-found-fallback-english = <strong data-l10n-name="strong">Good news:</strong> The page you requested exists in <em data-l10n-name="em">English</em>.
|
|
79
|
+
not-found-fallback-search = The page you requested doesn't exist, but you could try a site search for:
|
|
80
|
+
not-found-back = Go back to the home page
|
|
81
|
+
|
|
82
|
+
reference-toc-header = In this article
|
|
83
|
+
|
|
84
|
+
footer-mofo = Visit <a data-l10n-name="moco">Mozilla Corporation’s</a> not-for-profit parent, the <a data-l10n-name="mofo">Mozilla Foundation</a>.
|
|
85
|
+
footer-copyright = Portions of this content are \xa91998–{ $year } by individual mozilla.org contributors. Content available under <a data-l10n-name="cc">a Creative Commons license</a>.
|
|
86
|
+
|
|
87
|
+
search-modal-site-search = Site search for <em>{ $query }</em>
|
|
88
|
+
|
|
89
|
+
site-search-search-stats = Found { $results } documents.
|
|
90
|
+
site-search-suggestion-matches = { $relation ->
|
|
91
|
+
[gt] more than { $matches ->
|
|
92
|
+
[one] { $matches } match
|
|
93
|
+
*[other] { $matches } matches
|
|
94
|
+
}
|
|
95
|
+
*[eq] { $matches ->
|
|
96
|
+
[one] { $matches } match
|
|
97
|
+
*[other] { $matches } matches
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
site-search-suggestions-text = Did you mean:
|
|
101
|
+
|
|
102
|
+
blog-time-to-read = { $minutes ->
|
|
103
|
+
[one] { $minutes } minute read
|
|
104
|
+
*[other] { $minutes } minutes read
|
|
105
|
+
}
|
|
106
|
+
blog-post-not-found = Blog post not found.
|
|
107
|
+
|
|
108
|
+
blog-previous = Previous post
|
|
109
|
+
blog-next = Next post
|
|
110
|
+
|
|
111
|
+
-brand-name-obs = HTTP Observatory
|
|
112
|
+
obs-report = Report
|
|
113
|
+
obs-title = { -brand-name-obs }
|
|
114
|
+
obs-landing-intro = Launched in 2016, the { -brand-name-obs } enhances web security by analyzing compliance with best security practices. It has provided insights to over 6.9 million websites through 47 million scans.
|
|
115
|
+
obs-assessment = Developed by Mozilla, the { -brand-name-obs } performs an in-depth assessment of a site’s HTTP headers and other key security configurations.
|
|
116
|
+
obs-scanning = Its automated scanning process provides developers and website administrators with detailed, actionable feedback, focusing on identifying and addressing potential security vulnerabilities.
|
|
117
|
+
obs-security = The tool is instrumental in helping developers and website administrators strengthen their sites against common security threats in a constantly advancing digital environment.
|
|
118
|
+
obs-mdn = The { -brand-name-obs } provides effective security insights, guided by Mozilla's expertise and commitment to a safer and more secure internet and based on well-established trends and guidelines.
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
compat-loading = Loading…
|
|
122
|
+
|
|
123
|
+
compat-browser-version-date = { $browser } { $version } – Release date: { $date }
|
|
124
|
+
compat-browser-version-released = Release date: { $date }
|
|
125
|
+
|
|
126
|
+
compat-link-report-issue = Report problems with this compatibility data
|
|
127
|
+
compat-link-report-issue-title = Report an issue with this compatibility data
|
|
128
|
+
compat-link-report-missing-title = Report missing compatibility data
|
|
129
|
+
compat-link-report-missing = Report this issue
|
|
130
|
+
compat-link-source = View data on GitHub
|
|
131
|
+
compat-link-source-title = File: { $filename }
|
|
132
|
+
|
|
133
|
+
compat-deprecated = Deprecated
|
|
134
|
+
compat-experimental = Experimental
|
|
135
|
+
compat-nonstandard = Non-standard
|
|
136
|
+
compat-no = No
|
|
137
|
+
|
|
138
|
+
compat-support-full = Full support
|
|
139
|
+
compat-support-partial = Partial support
|
|
140
|
+
compat-support-no = No support
|
|
141
|
+
compat-support-unknown = Support unknown
|
|
142
|
+
compat-support-preview = Preview browser support
|
|
143
|
+
compat-support-prefix = Implemented with the vendor prefix: { $prefix }
|
|
144
|
+
compat-support-altname = Alternate name: { $altname }
|
|
145
|
+
compat-support-removed = Removed in { $version } and later
|
|
146
|
+
compat-support-see-impl-url = See <a data-l10n-name="impl_url">{ $label }</a>
|
|
147
|
+
compat-support-flags =
|
|
148
|
+
{ NUMBER($has_added) ->
|
|
149
|
+
[one] From version { $version_added }
|
|
150
|
+
*[other] {""}
|
|
151
|
+
}{ $has_last ->
|
|
152
|
+
[one] { NUMBER($has_added) ->
|
|
153
|
+
*[zero] Until { $versionLast } users
|
|
154
|
+
[one] {" "}until { $versionLast } users
|
|
155
|
+
}
|
|
156
|
+
*[zero] { NUMBER($has_added) ->
|
|
157
|
+
*[zero] Users
|
|
158
|
+
[one] {" "}users
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
{" "}must explicitly set the <code data-l10n-name="name">{ $flag_name }</code>{" "}
|
|
162
|
+
{ $flag_type ->
|
|
163
|
+
*[preference] preference
|
|
164
|
+
[runtime_flag] runtime flag
|
|
165
|
+
}{ NUMBER($has_value) ->
|
|
166
|
+
[one] {" "}to <code data-l10n-name="value">{ $flag_value }</code>
|
|
167
|
+
*[other] {""}
|
|
168
|
+
}{"."}
|
|
169
|
+
{ NUMBER($has_pref_url) ->
|
|
170
|
+
[one] { $flag_type ->
|
|
171
|
+
[preference] To change preferences in { $browser_name }, visit { $browser_pref_url }.
|
|
172
|
+
*[other] {""}
|
|
173
|
+
}
|
|
174
|
+
*[other] {""}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
compat-legend = Legend
|
|
178
|
+
compat-legend-tip = Tip: you can click/tap on a cell for more information.
|
|
179
|
+
compat-legend-yes = { compat-support-full }
|
|
180
|
+
compat-legend-partial = { compat-support-partial }
|
|
181
|
+
compat-legend-preview = In development. Supported in a pre-release version.
|
|
182
|
+
compat-legend-no = { compat-support-no }
|
|
183
|
+
compat-legend-unknown = Compatibility unknown
|
|
184
|
+
compat-legend-experimental = { compat-experimental }. Expect behavior to change in the future.
|
|
185
|
+
compat-legend-nonstandard = { compat-nonstandard }. Check cross-browser support before using.
|
|
186
|
+
compat-legend-deprecated = { compat-deprecated }. Not for use in new websites.
|
|
187
|
+
compat-legend-footnote = See implementation notes.
|
|
188
|
+
compat-legend-disabled = User must explicitly enable this feature.
|
|
189
|
+
compat-legend-altname = Uses a non-standard name.
|
|
190
|
+
compat-legend-prefix = Requires a vendor prefix or different name for use.
|
|
191
|
+
compat-legend-more = Has more compatibility info.
|
|
192
|
+
|
|
193
|
+
placement-note = Ad
|
|
194
|
+
placement-no = Don't want to see ads?
|
|
195
|
+
|
|
196
|
+
pagination-next = Next page
|
|
197
|
+
pagination-prev = Previous page
|
|
198
|
+
pagination-current = Current page
|
|
199
|
+
pagination-goto = Go to page { $page }
|
|
200
|
+
|
|
201
|
+
logout = Sign out
|
|
202
|
+
login = Log in
|
|
203
|
+
settings = My settings
|
|
204
|
+
|
|
205
|
+
example-play-button-label = Play
|
|
206
|
+
example-play-button-title = Run example in MDN Playground (opens in new tab)
|
|
207
|
+
`,i={"en-US":s,de:`content-feedback-question = War diese \xdcbersetzung hilfreich?
|
|
208
|
+
content-feedback-reason = Warum war diese \xdcbersetzung nicht hilfreich?
|
|
209
|
+
content-feedback-thanks = Vielen Dank f\xfcr die R\xfcckmeldung!
|
|
210
|
+
|
|
211
|
+
reference-toc-header = In diesem Artikel
|
|
212
|
+
|
|
213
|
+
footer-tagline = Dein Bauplan f\xfcr ein besseres Internet.
|
|
214
|
+
footer-mofo = Besuche die gemeinn\xfctzige Muttergesellschaft der <a data-l10n-name="moco">Mozilla Corporation</a>, die <a data-l10n-name="mofo">Mozilla Foundation</a>.
|
|
215
|
+
footer-copyright = Teile dieses Inhalts sind \xa91998–{ $year } von einzelnen mozilla.org-Mitwirkenden. Inhalte sind verf\xfcgbar unter <a data-l10n-name="cc">einer Creative-Commons-Lizenz</a>.
|
|
216
|
+
|
|
217
|
+
search-modal-site-search = Erweiterte Suche nach <em>{ $query }</em>
|
|
218
|
+
|
|
219
|
+
site-search-search-stats = { $results } Dokumente gefunden.
|
|
220
|
+
site-search-suggestion-matches = { $relation ->
|
|
221
|
+
[gt] mehr als { $matches ->
|
|
222
|
+
[one] { $matches } \xdcbereinstimmung
|
|
223
|
+
*[other] { $matches } \xdcbereinstimmungen
|
|
224
|
+
}
|
|
225
|
+
*[eq] { $matches ->
|
|
226
|
+
[one] { $matches } \xdcbereinstimmung
|
|
227
|
+
*[other] { $matches } \xdcbereinstimmungen
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
site-search-suggestions-text = Meinten Sie:
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
theme-default = Systemstandard
|
|
234
|
+
|
|
235
|
+
blog-time-to-read = { $minutes ->
|
|
236
|
+
[one] { $minutes } Minute Lesezeit
|
|
237
|
+
*[other] { $minutes } Minuten Lesezeit
|
|
238
|
+
}
|
|
239
|
+
blog-post-not-found = Blogartikel nicht gefunden.
|
|
240
|
+
|
|
241
|
+
blog-previous = Voriger Artikel
|
|
242
|
+
blog-next = N\xe4chster Artikel
|
|
243
|
+
|
|
244
|
+
No = Nein
|
|
245
|
+
Submit = Abschicken
|
|
246
|
+
Yes = Ja
|
|
247
|
+
|
|
248
|
+
obs-report = Report
|
|
249
|
+
|
|
250
|
+
obs-title = HTTP Observatory
|
|
251
|
+
obs-landing-intro = Seit 2016 verbessert HTTP Observatory die Sicherheit durch Analyse der Einhaltung bew\xe4hrter Sicherheitspraktiken. Es hat durch 47 Millionen Scans Einblicke in \xfcber 6,9 Millionen Websites geliefert.
|
|
252
|
+
obs-assessment = Das von Mozilla entwickelte HTTP Observatory f\xfchrt eine umfassende Bewertung der HTTP-Header und weiterer zentraler Sicherheitskonfigurationen einer Website durch.
|
|
253
|
+
obs-scanning = Der automatisierte Scan-Prozess liefert Entwicklern und Website-Administratoren detailliertes, handlungsorientiertes Feedback und konzentriert sich darauf, potenzielle Sicherheitsl\xfccken zu erkennen und zu beheben.
|
|
254
|
+
obs-security = Das Tool unterst\xfctzt Entwickler und Website-Administratoren ma\xdfgeblich dabei, ihre Websites in einem sich stetig weiterentwickelnden digitalen Umfeld gegen h\xe4ufige Sicherheitsbedrohungen abzusichern.
|
|
255
|
+
obs-mdn = Das HTTP Observatory bietet wirksame Sicherheitseinblicke auf Grundlage von Mozillas Expertise und Engagement f\xfcr ein sichereres Internet sowie basierend auf etablierten Trends und Richtlinien.
|
|
256
|
+
`,es:`blog-toc-title = En este art\xedculo
|
|
257
|
+
|
|
258
|
+
`,fr:`article-footer-last-modified = Cette page a \xe9t\xe9 modifi\xe9e le <time data-l10n-name="date">{ $date }</time> par les <a data-l10n-name="contributors">contributeurs du MDN</a>.
|
|
259
|
+
article-footer-source-title = Dossier : { $folder } (Ouvre un onglet)
|
|
260
|
+
|
|
261
|
+
baseline-asterisk = Certaines parties de cette fonctionnalit\xe9 peuvent b\xe9n\xe9ficier de prise en charge variables.
|
|
262
|
+
baseline-high-extra = Cette fonctionnalit\xe9 est bien \xe9tablie et fonctionne sur de nombreux appareils et versions de navigateurs. Elle est disponible sur tous les navigateurs depuis { $date }.
|
|
263
|
+
baseline-low-extra = Depuis { $date }, cette fonctionnalit\xe9 fonctionne sur les appareils et les versions de navigateur les plus r\xe9cents. Elle peut ne pas fonctionner sur les appareils ou navigateurs plus anciens.
|
|
264
|
+
baseline-not-extra = Cette fonctionnalit\xe9 n'est pas Compatible car elle ne fonctionne pas dans certains des navigateurs les plus utilis\xe9s.
|
|
265
|
+
baseline-supported-in = Pris en charge dans { $browsers }
|
|
266
|
+
baseline-unsupported-in = Pas compl\xe8tement pris en charge dans { $browsers }
|
|
267
|
+
baseline-supported-and-unsupported-in = Pris en charge dans { $supported }, mais pas compl\xe8tement pris en charge dans { $unsupported }
|
|
268
|
+
|
|
269
|
+
homepage-hero-title = Des ressources pour les D\xe9veloppeurs,<br> par les D\xe9veloppeurs
|
|
270
|
+
homepage-hero-description = Documenter le <a data-l10n-name="css">CSS</a>, le <a data-l10n-name="html">HTML</a> et le <a data-l10n-name="js">JavaScript</a>, depuis 2005.
|
|
271
|
+
|
|
272
|
+
not-found-title = Page non trouv\xe9e
|
|
273
|
+
not-found-description = D\xe9sol\xe9, la page <code data-l10n-name="url">{ $url }</code> n'a pas \xe9t\xe9 trouv\xe9e.
|
|
274
|
+
not-found-fallback-english = <strong data-l10n-name="strong">Bonne nouvelle :</strong> La page que vous cherchez existe en <em data-l10n-name="em">Anglais</em>.
|
|
275
|
+
not-found-fallback-search = La page que vous avez demand\xe9e n'existe pas, mais vous pouvez essayer une recherche sur le site pour :
|
|
276
|
+
not-found-back = Retour \xe0 la page d'accueil
|
|
277
|
+
|
|
278
|
+
reference-toc-header = Dans cet article
|
|
279
|
+
|
|
280
|
+
footer-mofo = Visitez la soci\xe9t\xe9 m\xe8re \xe0 but non lucratif de <a data-l10n-name="moco">Mozilla Corporation</a>, la <a data-l10n-name="mofo">Fondation Mozilla</a>.
|
|
281
|
+
footer-copyright = Certaines parties de ce contenu sont prot\xe9g\xe9es par le droit d'auteur \xa91998–{ $year } des contributeurs individuels de mozilla.org. Contenu disponible sous <a data-l10n-name="cc">une licence Creative Commons</a>.
|
|
282
|
+
|
|
283
|
+
search-modal-site-search = Rechercher sur le site <em>{ $query }</em>
|
|
284
|
+
|
|
285
|
+
site-search-search-stats = { $results } documents trouv\xe9s.
|
|
286
|
+
site-search-suggestion-matches = { $relation ->
|
|
287
|
+
[gt] plus que { $matches ->
|
|
288
|
+
[one] { $matches } trouv\xe9
|
|
289
|
+
*[other] { $matches } trouv\xe9s
|
|
290
|
+
}
|
|
291
|
+
*[eq] { $matches ->
|
|
292
|
+
[one] { $matches } trouv\xe9
|
|
293
|
+
*[other] { $matches } trouv\xe9s
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
site-search-suggestions-text = Voulez-vous dire :
|
|
297
|
+
|
|
298
|
+
blog-time-to-read = { $minutes ->
|
|
299
|
+
[one] { $minutes } minute de lecture
|
|
300
|
+
*[other] { $minutes } minutes de lecture
|
|
301
|
+
}
|
|
302
|
+
blog-post-not-found = Article de blog introuvable.
|
|
303
|
+
|
|
304
|
+
blog-previous = Article pr\xe9c\xe9dent
|
|
305
|
+
blog-next = Article suivant
|
|
306
|
+
|
|
307
|
+
-brand-name-obs = HTTP Observatory
|
|
308
|
+
obs-report = Signaler
|
|
309
|
+
obs-title = { -brand-name-obs }
|
|
310
|
+
obs-landing-intro = Lanc\xe9 en 2016, { -brand-name-obs } am\xe9liore la s\xe9curit\xe9 du Web en analysant la conformit\xe9 aux meilleures pratiques en mati\xe8re de s\xe9curit\xe9. Il a fourni des informations \xe0 plus de 6,9 millions de sites web gr\xe2ce \xe0 47 millions d'analyses.
|
|
311
|
+
obs-assessment = D\xe9velopp\xe9 par Mozilla, { -brand-name-obs } effectue une \xe9valuation approfondie des en-t\xeates HTTP d'un site et d'autres configurations de s\xe9curit\xe9 cl\xe9s.
|
|
312
|
+
obs-scanning = Son processus d'analyse automatis\xe9 fournit aux d\xe9veloppeurs et aux administrateurs de sites web des commentaires d\xe9taill\xe9s et exploitables, ax\xe9s sur l'identification et la r\xe9solution des failles de s\xe9curit\xe9 potentielles.
|
|
313
|
+
obs-security = Cet outil aide les d\xe9veloppeurs et les administrateurs de sites web \xe0 renforcer la s\xe9curit\xe9 de leurs sites contre les menaces courantes dans un environnement num\xe9rique en constante \xe9volution.
|
|
314
|
+
obs-mdn = { -brand-name-obs } fournit des informations efficaces en mati\xe8re de s\xe9curit\xe9, guid\xe9es par l'expertise et l'engagement de Mozilla en faveur d'un Internet plus s\xfbr et plus s\xe9curis\xe9, et bas\xe9es sur des tendances et des directives bien \xe9tablies.
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
compat-loading = Chargement…
|
|
318
|
+
|
|
319
|
+
compat-browser-version-date = { $browser } { $version } – Release date: { $date }
|
|
320
|
+
compat-browser-version-released = Release date: { $date }
|
|
321
|
+
|
|
322
|
+
compat-link-report-issue = Signaler des probl\xe8mes avec ces donn\xe9es de compatibilit\xe9
|
|
323
|
+
compat-link-report-issue-title = Signaler un probl\xe8me avec ces donn\xe9es de compatibilit\xe9
|
|
324
|
+
compat-link-report-missing-title = Signaler des donn\xe9es de compatibilit\xe9 manquantes
|
|
325
|
+
compat-link-report-missing = Signaler le probl\xe8me
|
|
326
|
+
compat-link-source = Voir les donn\xe9es sur GitHub
|
|
327
|
+
compat-link-source-title = Fichier : { $filename }
|
|
328
|
+
|
|
329
|
+
compat-deprecated = Obsol\xe8te
|
|
330
|
+
compat-experimental = Exp\xe9rimental
|
|
331
|
+
compat-nonstandard = Non standard
|
|
332
|
+
compat-no = Non
|
|
333
|
+
|
|
334
|
+
compat-support-full = Prise en charge compl\xe8te
|
|
335
|
+
compat-support-partial = Prise en charge partielle
|
|
336
|
+
compat-support-no = Pas de prise en charge
|
|
337
|
+
compat-support-unknown = Prise en charge inconnue
|
|
338
|
+
compat-support-preview = Pr\xe9-version du navigateur
|
|
339
|
+
compat-support-prefix = Impl\xe9ment\xe9 avec le pr\xe9fixe vendeur : { $prefix }
|
|
340
|
+
compat-support-altname = Nom alternatif : { $altname }
|
|
341
|
+
compat-support-removed = Supprim\xe9 en version { $version } et sup\xe9rieure
|
|
342
|
+
compat-support-see-impl-url = Voir <a data-l10n-name="impl_url">{ $label }</a>
|
|
343
|
+
compat-support-flags =
|
|
344
|
+
{ NUMBER($has_added) ->
|
|
345
|
+
[one] De la version { $version_added }
|
|
346
|
+
*[other] {""}
|
|
347
|
+
}{ $has_last ->
|
|
348
|
+
[one] { NUMBER($has_added) ->
|
|
349
|
+
*[zero] Jusqu'\xe0 { $versionLast } des utilisateurs
|
|
350
|
+
[one] {" "}jusqu'\xe0 { $versionLast } des utilisateurs
|
|
351
|
+
}
|
|
352
|
+
*[zero] { NUMBER($has_added) ->
|
|
353
|
+
*[zero] Utilisateurs
|
|
354
|
+
[one] {" "}utilisateurs
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
{" "}doit explicitement d\xe9finir le <code data-l10n-name="name">{ $flag_name }</code>{" "}
|
|
358
|
+
{ $flag_type ->
|
|
359
|
+
*[preference] pr\xe9f\xe9rences
|
|
360
|
+
[runtime_flag] indicateur d'ex\xe9cution
|
|
361
|
+
}{ NUMBER($has_value) ->
|
|
362
|
+
[one] {" "}\xe0 <code data-l10n-name="value">{ $flag_value }</code>
|
|
363
|
+
*[other] {""}
|
|
364
|
+
}{"."}
|
|
365
|
+
{ NUMBER($has_pref_url) ->
|
|
366
|
+
[one] { $flag_type ->
|
|
367
|
+
[preference] Pour changer vos pr\xe9f\xe9rences sur le navigateur { $browser_name }, visitez { $browser_pref_url }.
|
|
368
|
+
*[other] {""}
|
|
369
|
+
}
|
|
370
|
+
*[other] {""}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
compat-legend = L\xe9gende
|
|
374
|
+
compat-legend-tip = Astuce : cliquer/appuyer sur une cellule pour obtenir plus d'informations.
|
|
375
|
+
compat-legend-yes = { compat-support-full }
|
|
376
|
+
compat-legend-partial = { compat-support-partial }
|
|
377
|
+
compat-legend-preview = En cours de d\xe9veloppement. Pris en charge dans une pr\xe9-version.
|
|
378
|
+
compat-legend-no = { compat-support-no }
|
|
379
|
+
compat-legend-unknown = Compatibilit\xe9 inconnue
|
|
380
|
+
compat-legend-experimental = { compat-experimental }. Attendez-vous \xe0 ce que les comportements changent \xe0 l'avenir.
|
|
381
|
+
compat-legend-nonstandard = { compat-nonstandard }. V\xe9rifiez la compatibilit\xe9 entre les navigateurs avant utilisation.
|
|
382
|
+
compat-legend-deprecated = { compat-deprecated }. Ne pas utiliser dans les nouveaux sites web.
|
|
383
|
+
compat-legend-footnote = Voir les notes de mise en application.
|
|
384
|
+
compat-legend-disabled = L'utilisateur doit explicitement activer cette fonctionnalit\xe9.
|
|
385
|
+
compat-legend-altname = Utilise un nom hors standard.
|
|
386
|
+
compat-legend-prefix = N\xe9cessite un pr\xe9fixe vendeur ou un nom diff\xe9rent pour \xeatre utilis\xe9.
|
|
387
|
+
compat-legend-more = Contient davantage d'informations sur la compatibilit\xe9.
|
|
388
|
+
|
|
389
|
+
placement-note = Publicit\xe9
|
|
390
|
+
placement-no = Vous ne voulez pas voir de publicit\xe9s ?
|
|
391
|
+
|
|
392
|
+
pagination-next = Page suivante
|
|
393
|
+
pagination-prev = Page pr\xe9c\xe9dente
|
|
394
|
+
pagination-current = Page actuelle
|
|
395
|
+
pagination-goto = Aller \xe0 la page { $page }
|
|
396
|
+
|
|
397
|
+
logout = Se d\xe9connecter
|
|
398
|
+
login = Se connecter
|
|
399
|
+
settings = Mes param\xe8tres
|
|
400
|
+
|
|
401
|
+
example-play-button-label = Ex\xe9cuter
|
|
402
|
+
example-play-button-title = Ex\xe9cutez l'exemple dans MDN Playground (ouvre un nouvel onglet)
|
|
403
|
+
`,ja:`blog-toc-title = この記事では
|
|
404
|
+
|
|
405
|
+
`,ko:`blog-toc-title = 목차
|
|
406
|
+
`,"pt-BR":`blog-toc-title = Neste artigo
|
|
407
|
+
|
|
408
|
+
`,ru:`blog-toc-title = В этой статье
|
|
409
|
+
`,"zh-CN":`blog-toc-title = 在本文中
|
|
410
|
+
`,"zh-TW":`blog-toc-title = 在本文中
|
|
411
|
+
`},l=["i","strong","br","em"],c=["title","aria-label"];let Fluent=class Fluent{constructor(e="en-US",t=[]){this.locale=e,this.usBundle=Fluent.constructBundle(new a.Np(e),[s]),t.length>0&&(this.bundle=Fluent.constructBundle(new a.Np(e),[s,...t]))}static constructBundle(e,t=[]){for(let n of t){let t=e.addResource(new a.B$(n),{allowOverrides:!0});t.length>0&&console.error(t)}return e}get(e,t,n,a){let o=this.getMessage(e,t,n);if(o)return Fluent.sanitize(o,a)}static sanitize(e,t={}){let n={};for(let e of Object.values(t))n[e.tag]=[...Object.keys(e).filter(e=>"tag"!==e),...c];let a=[...Object.values(t).map(e=>e.tag),...l],s=!0,i=o(e,{allowedAttributes:n,allowedTags:a,allowedSchemes:["http","https","mailto"],filter(e){let n=e.attrs["data-l10n-name"];if(n)for(let[a,o]of Object.entries(t[n]||{}))e.attrs[a]=o;return!!(l.includes(e.tag)||n&&Object.keys(t).includes(n)&&t[n]?.tag===e.tag)&&(s=!1,!0)}},!0);return s?i:(0,r._)(i)}getMessage(e,t,n={},a=this.bundle,o=!1){let r,s=a?a.getMessage(e):void 0;if("qa"===this.locale)return`[${e}${t?`.${t}`:""}]`;if(!s){if(o)return;return this.getMessage(e,t,n,this.usBundle,!0)}if(t){if(!(r=s.attributes[t])){if(o)return;return this.getMessage(e,t,n,this.usBundle,!0)}}else s.value&&(r=s.value);if(!r||!a)return"";let i=[],l=a?.formatPattern(r,n,i);return i.length>0&&console.error(i),l}};let d=new Map;function u(e){if(e){if(!d.has(e)){let t=i[e],n=new Fluent(e,t?[t]:void 0);d.set(e,n)}return d.get(e)}}let m=e=>class extends e{constructor(...e){let t,n;super(...e);let a=(t=globalThis.__MDNServerContext?.getStore(),n=globalThis.__MDNClientContext,t||n);this.locale=a.locale,this.l10n=function(e){function t(t,n){if("string"==typeof t){let n=u(e)?.get(t),a=`[${t}]`,o=e=>{let t=e[0];return n||t||a};return o.toString=()=>"string"==typeof n&&n||a,o}return t[0]||""}return t.raw=function({id:t,attr:n,args:a,elements:o}){let r=u(e);return r?r.get(t,n,a,o):`[${t}]`},t}(this.locale)}}},4591:function(){globalThis.__MDNClientContext={locale:globalThis.location.pathname.split("/")[1]||"en-US"}},39943:function(e,t,n){n.d(t,{w:()=>o});var a=n(92);function o(e){a.A.recordElementClick({id:e,url:globalThis.location.href,referrer:document.referrer,title:document.title})}},90528:function(e,t,n){n.d(t,{o:()=>a});function a(e,t){let n=e.replaceAll("_"," ").split("/").filter(e=>!["",t,"docs"].includes(e));return(n=n.map(e=>"API"===e?"Web APIs":e)).length>1&&"Web"===n.at(0)&&n.splice(0,1),n.length>1&&n.splice(-1,1),n.join(" / ")}},93772:function(e,t,n){n.d(t,{G:()=>a});function a(e){return(e||document.cookie).split("; ").includes("moz-1st-party-data-opt-out=true")}}};import e from"./runtime.f3c0cd5b45c6e874.js";import*as t from"./5935.b56577341146e516.js";e.C(t);import*as n from"./1127.49790b26827d316c.js";e.C(n);import*as a from"./index.0f1f5c05b3c9458b.js";e.C(a),e(e.s=31051);
|
|
412
|
+
//# sourceMappingURL=index.0f1f5c05b3c9458b.js.map
|