diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 897710ab9f8937e..695b775aa894b18 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -1381,7 +1381,7 @@ /en-US/docs/DOM/Input.setSelectionRange /en-US/docs/Web/API/HTMLInputElement/setSelectionRange /en-US/docs/DOM/KeyboardEvent /en-US/docs/Web/API/KeyboardEvent /en-US/docs/DOM/LinkStyle /en-US/docs/Web/API/HTMLLinkElement -/en-US/docs/DOM/Locating_DOM_elements_using_selectors /en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors +/en-US/docs/DOM/Locating_DOM_elements_using_selectors /en-US/docs/Web/API/Document_Object_Model/Locating_DOM_elements_using_selectors /en-US/docs/DOM/Manipulating_the_browser_history /en-US/docs/Web/API/History_API /en-US/docs/DOM/Manipulating_the_browser_history/Example /en-US/docs/Web/API/History_API/Working_with_the_History_API /en-US/docs/DOM/MediaQueryList /en-US/docs/Web/API/MediaQueryList @@ -2106,7 +2106,7 @@ /en-US/docs/DOM/window.frames /en-US/docs/Web/API/Window/frames /en-US/docs/DOM/window.fullScreen /en-US/docs/Web/API/Window/fullScreen /en-US/docs/DOM/window.getComputedStyle /en-US/docs/Web/API/Window/getComputedStyle -/en-US/docs/DOM/window.getDefaultComputedStyle /en-US/docs/Web/API/window/getDefaultComputedStyle +/en-US/docs/DOM/window.getDefaultComputedStyle /en-US/docs/Web/API/Window/getDefaultComputedStyle /en-US/docs/DOM/window.getSelection /en-US/docs/Web/API/Window/getSelection /en-US/docs/DOM/window.history /en-US/docs/Web/API/Window/history /en-US/docs/DOM/window.innerHeight /en-US/docs/Web/API/Window/innerHeight @@ -2123,7 +2123,7 @@ /en-US/docs/DOM/window.mozInnerScreenX /en-US/docs/Web/API/Window/mozInnerScreenX /en-US/docs/DOM/window.mozInnerScreenY /en-US/docs/Web/API/Window/mozInnerScreenY /en-US/docs/DOM/window.mozPaintCount /en-US/docs/Web/API/Window -/en-US/docs/DOM/window.mozRequestAnimationFrame /en-US/docs/Web/API/window/requestAnimationFrame +/en-US/docs/DOM/window.mozRequestAnimationFrame /en-US/docs/Web/API/Window/requestAnimationFrame /en-US/docs/DOM/window.name /en-US/docs/Web/API/Window/name /en-US/docs/DOM/window.navigator /en-US/docs/Web/API/Window/navigator /en-US/docs/DOM/window.navigator.appCodeName /en-US/docs/Web/API/Navigator/appCodeName @@ -2203,7 +2203,7 @@ /en-US/docs/DOM/window.print /en-US/docs/Web/API/Window/print /en-US/docs/DOM/window.prompt /en-US/docs/Web/API/Window/prompt /en-US/docs/DOM/window.releaseEvents /en-US/docs/Web/API/Window/releaseEvents -/en-US/docs/DOM/window.requestAnimationFrame /en-US/docs/Web/API/window/requestAnimationFrame +/en-US/docs/DOM/window.requestAnimationFrame /en-US/docs/Web/API/Window/requestAnimationFrame /en-US/docs/DOM/window.resizeBy /en-US/docs/Web/API/Window/resizeBy /en-US/docs/DOM/window.resizeTo /en-US/docs/Web/API/Window/resizeTo /en-US/docs/DOM/window.restore /en-US/docs/Web/API/Window/moveTo @@ -2843,7 +2843,7 @@ /en-US/docs/Document_Object_Model_(DOM)/Input.select /en-US/docs/Web/API/HTMLInputElement/select /en-US/docs/Document_Object_Model_(DOM)/Input.setSelectionRange /en-US/docs/Web/API/HTMLInputElement/setSelectionRange /en-US/docs/Document_Object_Model_(DOM)/KeyboardEvent /en-US/docs/Web/API/KeyboardEvent -/en-US/docs/Document_Object_Model_(DOM)/Locating_DOM_elements_using_selectors /en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors +/en-US/docs/Document_Object_Model_(DOM)/Locating_DOM_elements_using_selectors /en-US/docs/Web/API/Document_Object_Model/Locating_DOM_elements_using_selectors /en-US/docs/Document_Object_Model_(DOM)/MediaQueryList /en-US/docs/Web/API/MediaQueryList /en-US/docs/Document_Object_Model_(DOM)/MediaQueryListListener /en-US/docs/Web/API/MediaQueryList /en-US/docs/Document_Object_Model_(DOM)/NamedNodeMap /en-US/docs/Web/API/NamedNodeMap @@ -3349,7 +3349,7 @@ /en-US/docs/Document_Object_Model_(DOM)/window.postMessage /en-US/docs/Web/API/Window/postMessage /en-US/docs/Document_Object_Model_(DOM)/window.prompt /en-US/docs/Web/API/Window/prompt /en-US/docs/Document_Object_Model_(DOM)/window.releaseEvents /en-US/docs/Web/API/Window/releaseEvents -/en-US/docs/Document_Object_Model_(DOM)/window.requestAnimationFrame /en-US/docs/Web/API/window/requestAnimationFrame +/en-US/docs/Document_Object_Model_(DOM)/window.requestAnimationFrame /en-US/docs/Web/API/Window/requestAnimationFrame /en-US/docs/Document_Object_Model_(DOM)/window.resizeBy /en-US/docs/Web/API/Window/resizeBy /en-US/docs/Document_Object_Model_(DOM)/window.resizeTo /en-US/docs/Web/API/Window/resizeTo /en-US/docs/Document_Object_Model_(DOM)/window.restore /en-US/docs/Web/API/Window/moveTo @@ -3994,7 +3994,7 @@ /en-US/docs/HTTP_access_control /en-US/docs/Web/HTTP/CORS /en-US/docs/How_to_Turn_Off_Form_Autocompletion /en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion /en-US/docs/How_to_check_the_security_state_of_an_XMLHTTPRequest_over_SSL /en-US/docs/Web/API/XMLHttpRequest -/en-US/docs/How_to_create_a_DOM_tree /en-US/docs/Web/API/Document_object_model/How_to_create_a_DOM_tree +/en-US/docs/How_to_create_a_DOM_tree /en-US/docs/Web/API/Document_Object_Model/How_to_create_a_DOM_tree /en-US/docs/How_to_start_contributions_to_Mozilla /en-US/docs/MDN/Community/Contributing/Getting_started /en-US/docs/ICC_color_correction_in_Firefox /en-US/docs/Mozilla/Firefox/Releases/3.5/ICC_color_correction_in_Firefox /en-US/docs/IMAP /en-US/docs/Glossary/IMAP @@ -5415,9 +5415,9 @@ /en-US/docs/MDN/Contribute/Content /en-US/docs/MDN/Writing_guidelines /en-US/docs/MDN/Contribute/Content/Content_blocks /en-US/docs/MDN/Writing_guidelines/Howto/Markdown_in_MDN /en-US/docs/MDN/Contribute/Content/Custom_macros /en-US/docs/MDN/Writing_guidelines/Page_structures/Macros/Commonly_used_macros -/en-US/docs/MDN/Contribute/Content/Layout/API_landing_page /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference -/en-US/docs/MDN/Contribute/Content/Layout/Reference_page /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference -/en-US/docs/MDN/Contribute/Content/Layout/Reference_subpage /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference +/en-US/docs/MDN/Contribute/Content/Layout/API_landing_page /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference +/en-US/docs/MDN/Contribute/Content/Layout/Reference_page /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference +/en-US/docs/MDN/Contribute/Content/Layout/Reference_subpage /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference /en-US/docs/MDN/Contribute/Content/Macros /en-US/docs/MDN/Writing_guidelines/Page_structures/Macros /en-US/docs/MDN/Contribute/Content/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Sidebars /en-US/docs/MDN/Contribute/Content/Specification_tables /en-US/docs/MDN/Writing_guidelines/Page_structures/Specification_tables @@ -5448,9 +5448,9 @@ /en-US/docs/MDN/Contribute/Guidelines/Custom_macros /en-US/docs/MDN/Writing_guidelines/Page_structures/Macros/Commonly_used_macros /en-US/docs/MDN/Contribute/Guidelines/Does_this_belong_on_MDN /en-US/docs/MDN/Writing_guidelines/What_we_write /en-US/docs/MDN/Contribute/Guidelines/Editorial /en-US/docs/MDN/Writing_guidelines/What_we_write -/en-US/docs/MDN/Contribute/Guidelines/Layout/API_landing_page /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference -/en-US/docs/MDN/Contribute/Guidelines/Layout/Reference_page /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference -/en-US/docs/MDN/Contribute/Guidelines/Layout/Reference_subpage /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference +/en-US/docs/MDN/Contribute/Guidelines/Layout/API_landing_page /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference +/en-US/docs/MDN/Contribute/Guidelines/Layout/Reference_page /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference +/en-US/docs/MDN/Contribute/Guidelines/Layout/Reference_subpage /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference /en-US/docs/MDN/Contribute/Guidelines/Macros /en-US/docs/MDN/Writing_guidelines/Page_structures/Macros /en-US/docs/MDN/Contribute/Guidelines/Quicklinks /en-US/docs/MDN/Writing_guidelines/Page_structures/Sidebars /en-US/docs/MDN/Contribute/Guidelines/Specification_tables /en-US/docs/MDN/Writing_guidelines/Page_structures/Specification_tables @@ -5475,9 +5475,9 @@ /en-US/docs/MDN/Contribute/Howto/Tag /en-US/docs/MDN/Writing_guidelines/Howto /en-US/docs/MDN/Contribute/Howto/Update_the_CSS_JSON_DB https://github.com/mdn/data/blob/main/docs/updating_css_json.md /en-US/docs/MDN/Contribute/Howto/Write_a_new_entry_in_the_Glossary /en-US/docs/MDN/Writing_guidelines/Howto/Write_a_new_entry_in_the_Glossary -/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference -/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file -/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference/Sidebars /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars +/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference +/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file +/en-US/docs/MDN/Contribute/Howto/Write_an_API_reference/Sidebars /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars /en-US/docs/MDN/Contribute/Howto/Write_for_SEO /en-US/docs/MDN/Writing_guidelines/Writing_style_guide /en-US/docs/MDN/Contribute/Localize /en-US/docs/MDN/Community/Contributing/Translated_content /en-US/docs/MDN/Contribute/Markdown_in_MDN /en-US/docs/MDN/Writing_guidelines/Howto/Markdown_in_MDN @@ -5493,7 +5493,7 @@ /en-US/docs/MDN/Contribute/Sample_server /en-US/docs/MDN /en-US/docs/MDN/Contribute/Structures /en-US/docs/MDN/Writing_guidelines/Page_structures /en-US/docs/MDN/Contribute/Structures/:-ms-input-placeholder_pseudo-class /en-US/docs/Web/CSS/:placeholder-shown -/en-US/docs/MDN/Contribute/Structures/API_references/API_reference_sidebars /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars +/en-US/docs/MDN/Contribute/Structures/API_references/API_reference_sidebars /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars /en-US/docs/MDN/Contribute/Structures/Banners_and_notices /en-US/docs/MDN/Writing_guidelines/Page_structures/Banners_and_notices /en-US/docs/MDN/Contribute/Structures/Code_examples /en-US/docs/MDN/Writing_guidelines/Page_structures/Code_examples /en-US/docs/MDN/Contribute/Structures/Compatibility_tables /en-US/docs/MDN/Writing_guidelines/Page_structures/Compatibility_tables @@ -5571,7 +5571,7 @@ /en-US/docs/MDN/Quick_start /en-US/docs/MDN/Community/Contributing/Getting_started /en-US/docs/MDN/Structures /en-US/docs/MDN/Writing_guidelines/Page_structures /en-US/docs/MDN/Structures/:-ms-input-placeholder_pseudo-class /en-US/docs/Web/CSS/:placeholder-shown -/en-US/docs/MDN/Structures/API_references/API_reference_sidebars /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars +/en-US/docs/MDN/Structures/API_references/API_reference_sidebars /en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars /en-US/docs/MDN/Structures/Banners_and_notices /en-US/docs/MDN/Writing_guidelines/Page_structures/Banners_and_notices /en-US/docs/MDN/Structures/Code_examples /en-US/docs/MDN/Writing_guidelines/Page_structures/Code_examples /en-US/docs/MDN/Structures/Compatibility_tables /en-US/docs/MDN/Writing_guidelines/Page_structures/Compatibility_tables @@ -7361,9 +7361,9 @@ /en-US/docs/Using_the_:target_selector /en-US/docs/Web/CSS/CSS_Selectors/Using_the_:target_pseudo-class_in_selectors /en-US/docs/Using_the_Mozilla_JavaScript_interface_to_XPath /en-US/docs/Web/XPath/Introduction_to_using_XPath_in_JavaScript /en-US/docs/Using_the_Mozilla_JavaScript_interface_to_XSL_Transformations /en-US/docs/Web/API/XSLTProcessor -/en-US/docs/Using_the_W3C_DOM_Level_1_Core /en-US/docs/Web/API/Document_object_model/Using_the_Document_Object_Model -/en-US/docs/Using_the_W3C_DOM_Level_1_Core/Example /en-US/docs/Web/API/Document_object_model/Using_the_Document_Object_Model/Example -/en-US/docs/Using_the_W3C_DOM_Level_1_Core:Example /en-US/docs/Web/API/Document_object_model/Using_the_Document_Object_Model/Example +/en-US/docs/Using_the_W3C_DOM_Level_1_Core /en-US/docs/Web/API/Document_Object_Model/Using_the_Document_Object_Model +/en-US/docs/Using_the_W3C_DOM_Level_1_Core/Example /en-US/docs/Web/API/Document_Object_Model/Using_the_Document_Object_Model/Example +/en-US/docs/Using_the_W3C_DOM_Level_1_Core:Example /en-US/docs/Web/API/Document_Object_Model/Using_the_Document_Object_Model/Example /en-US/docs/Using_the_Web_Console https://firefox-source-docs.mozilla.org/devtools-user/web_console/index.html /en-US/docs/Using_the_Web_Console/Helpers https://firefox-source-docs.mozilla.org/devtools-user/web_console/helpers/index.html /en-US/docs/Using_the_Web_Console/WebConsoleHelp https://firefox-source-docs.mozilla.org/devtools-user/web_console/helpers/index.html @@ -8045,9 +8045,9 @@ /en-US/docs/Web/API/DocumentTouch/createTouchList /en-US/docs/Web/API/Document/createTouchList /en-US/docs/Web/API/Document_Object_Model/Events /en-US/docs/Learn/JavaScript/Building_blocks/Events /en-US/docs/Web/API/Document_Object_Model/Preface /en-US/docs/Web/API/Document_Object_Model +/en-US/docs/Web/API/Document_Object_Model/Using_the_W3C_DOM_Level_1_Core /en-US/docs/Web/API/Document_Object_Model/Using_the_Document_Object_Model +/en-US/docs/Web/API/Document_Object_Model/Using_the_W3C_DOM_Level_1_Core/Example /en-US/docs/Web/API/Document_Object_Model/Using_the_Document_Object_Model/Example /en-US/docs/Web/API/Document_Object_Model/Whitespace_in_the_DOM /en-US/docs/Web/API/Document_Object_Model/Whitespace -/en-US/docs/Web/API/Document_object_model/Using_the_W3C_DOM_Level_1_Core /en-US/docs/Web/API/Document_object_model/Using_the_Document_Object_Model -/en-US/docs/Web/API/Document_object_model/Using_the_W3C_DOM_Level_1_Core/Example /en-US/docs/Web/API/Document_object_model/Using_the_Document_Object_Model/Example /en-US/docs/Web/API/DoubleRange /en-US/docs/Web/API/MediaTrackConstraints /en-US/docs/Web/API/DynamicsCompressorNode.attack /en-US/docs/Web/API/DynamicsCompressorNode/attack /en-US/docs/Web/API/DynamicsCompressorNode.knee /en-US/docs/Web/API/DynamicsCompressorNode/knee @@ -10155,7 +10155,7 @@ /en-US/docs/Web/API/Window/minimize /en-US/docs/Web/API/Window /en-US/docs/Web/API/Window/mozAnimationStartTime /en-US/docs/Web/API/Animation/startTime /en-US/docs/Web/API/Window/mozPaintCount /en-US/docs/Web/API/Window -/en-US/docs/Web/API/Window/mozRequestAnimationFrame /en-US/docs/Web/API/window/requestAnimationFrame +/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/HTMLMediaElement/abort_event /en-US/docs/Web/API/Window/onafterprint /en-US/docs/Web/API/Window/afterprint_event /en-US/docs/Web/API/Window/onappinstalled /en-US/docs/Web/API/Window/appinstalled_event @@ -10799,7 +10799,7 @@ /en-US/docs/Web/API/window.frames /en-US/docs/Web/API/Window/frames /en-US/docs/Web/API/window.fullScreen /en-US/docs/Web/API/Window/fullScreen /en-US/docs/Web/API/window.getComputedStyle /en-US/docs/Web/API/Window/getComputedStyle -/en-US/docs/Web/API/window.getDefaultComputedStyle /en-US/docs/Web/API/window/getDefaultComputedStyle +/en-US/docs/Web/API/window.getDefaultComputedStyle /en-US/docs/Web/API/Window/getDefaultComputedStyle /en-US/docs/Web/API/window.getSelection /en-US/docs/Web/API/Window/getSelection /en-US/docs/Web/API/window.history /en-US/docs/Web/API/Window/history /en-US/docs/Web/API/window.innerHeight /en-US/docs/Web/API/Window/innerHeight @@ -10816,7 +10816,7 @@ /en-US/docs/Web/API/window.mozInnerScreenX /en-US/docs/Web/API/Window/mozInnerScreenX /en-US/docs/Web/API/window.mozInnerScreenY /en-US/docs/Web/API/Window/mozInnerScreenY /en-US/docs/Web/API/window.mozPaintCount /en-US/docs/Web/API/Window -/en-US/docs/Web/API/window.mozRequestAnimationFrame /en-US/docs/Web/API/window/requestAnimationFrame +/en-US/docs/Web/API/window.mozRequestAnimationFrame /en-US/docs/Web/API/Window/requestAnimationFrame /en-US/docs/Web/API/window.name /en-US/docs/Web/API/Window/name /en-US/docs/Web/API/window.navigator /en-US/docs/Web/API/Window/navigator /en-US/docs/Web/API/window.navigator.appCodeName /en-US/docs/Web/API/Navigator/appCodeName @@ -10895,7 +10895,7 @@ /en-US/docs/Web/API/window.print /en-US/docs/Web/API/Window/print /en-US/docs/Web/API/window.prompt /en-US/docs/Web/API/Window/prompt /en-US/docs/Web/API/window.releaseEvents /en-US/docs/Web/API/Window/releaseEvents -/en-US/docs/Web/API/window.requestAnimationFrame /en-US/docs/Web/API/window/requestAnimationFrame +/en-US/docs/Web/API/window.requestAnimationFrame /en-US/docs/Web/API/Window/requestAnimationFrame /en-US/docs/Web/API/window.resizeBy /en-US/docs/Web/API/Window/resizeBy /en-US/docs/Web/API/window.resizeTo /en-US/docs/Web/API/Window/resizeTo /en-US/docs/Web/API/window.restore /en-US/docs/Web/API/Window/moveTo @@ -12018,7 +12018,7 @@ /en-US/docs/Web/Guide/API/DOM/Events/Touch_events /en-US/docs/Web/API/Touch_events /en-US/docs/Web/Guide/API/DOM/Events/Touch_events_(Mozilla_experimental) /en-US/docs/Web/API/Touch_events /en-US/docs/Web/Guide/API/DOM/Events/Using_device_orientation_with_3D_transforms /en-US/docs/Web/API/Device_orientation_events/Using_device_orientation_with_3D_transforms -/en-US/docs/Web/Guide/API/DOM/Locating_DOM_elements_using_selectors /en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors +/en-US/docs/Web/Guide/API/DOM/Locating_DOM_elements_using_selectors /en-US/docs/Web/API/Document_Object_Model/Locating_DOM_elements_using_selectors /en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history /en-US/docs/Web/API/History_API /en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history/Example /en-US/docs/Web/API/History_API/Working_with_the_History_API /en-US/docs/Web/Guide/API/DOM/Storage /en-US/docs/Web/API/Web_Storage_API @@ -12098,7 +12098,7 @@ /en-US/docs/Web/Guide/DOM/Events/Touch_events /en-US/docs/Web/API/Touch_events /en-US/docs/Web/Guide/DOM/Events/Touch_events_(Mozilla_experimental) /en-US/docs/Web/API/Touch_events /en-US/docs/Web/Guide/DOM/Events/Using_device_orientation_with_3D_transforms /en-US/docs/Web/API/Device_orientation_events/Using_device_orientation_with_3D_transforms -/en-US/docs/Web/Guide/DOM/Locating_DOM_elements_using_selectors /en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors +/en-US/docs/Web/Guide/DOM/Locating_DOM_elements_using_selectors /en-US/docs/Web/API/Document_Object_Model/Locating_DOM_elements_using_selectors /en-US/docs/Web/Guide/DOM/Manipulating_the_browser_history /en-US/docs/Web/API/History_API /en-US/docs/Web/Guide/DOM/Manipulating_the_browser_history/Example /en-US/docs/Web/API/History_API/Working_with_the_History_API /en-US/docs/Web/Guide/DOM/Storage /en-US/docs/Web/API/Web_Storage_API diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 5d65680b23a86b0..67d704eeb8419bb 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -11728,7 +11728,7 @@ "nasifmdtanjim" ] }, - "MDN/Writing_guidelines/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file": { + "MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file": { "modified": "2019-10-01T06:57:46.015Z", "contributors": [ "chrisdavidmills", @@ -11744,7 +11744,7 @@ "jryans" ] }, - "MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars": { + "MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars": { "modified": "2020-09-30T09:04:08.085Z", "contributors": [ "chrisdavidmills", @@ -30245,7 +30245,7 @@ "JesseW" ] }, - "Web/API/Document_object_model/How_to_create_a_DOM_tree": { + "Web/API/Document_Object_Model/How_to_create_a_DOM_tree": { "modified": "2019-03-24T00:17:33.140Z", "contributors": [ "SphinxKnight", @@ -30264,7 +30264,7 @@ "ericjung" ] }, - "Web/API/Document_object_model/Locating_DOM_elements_using_selectors": { + "Web/API/Document_Object_Model/Locating_DOM_elements_using_selectors": { "modified": "2020-12-06T22:57:45.352Z", "contributors": [ "jordan-git", @@ -30282,7 +30282,7 @@ "asadotzler" ] }, - "Web/API/Document_object_model/Using_the_Document_Object_Model": { + "Web/API/Document_Object_Model/Using_the_Document_Object_Model": { "modified": "2020-12-09T01:05:18.504Z", "contributors": [ "skkiennhtg2327", @@ -30308,7 +30308,7 @@ "Gor1" ] }, - "Web/API/Document_object_model/Using_the_Document_Object_Model/Example": { + "Web/API/Document_Object_Model/Using_the_Document_Object_Model/Example": { "modified": "2019-03-23T23:40:45.010Z", "contributors": [ "mk7087", @@ -64969,7 +64969,7 @@ "modified": "2019-06-17T09:14:48.783Z", "contributors": ["Sheppy", "beaulac", "now-raymond", "chrisdavidmills"] }, - "Web/API/WebRTC_API/build_a_phone_with_peerjs/connect_peers/End_a_call": { + "Web/API/WebRTC_API/Build_a_phone_with_peerjs/Connect_peers/End_a_call": { "modified": "2020-12-10T13:59:26.911Z", "contributors": ["lolaodelola"] }, @@ -71762,7 +71762,7 @@ "JesseW" ] }, - "Web/API/window/getDefaultComputedStyle": { + "Web/API/Window/getDefaultComputedStyle": { "modified": "2020-10-15T21:20:40.098Z", "contributors": [ "mfluehr", @@ -71779,7 +71779,7 @@ "Bzbarsky" ] }, - "Web/API/window/requestAnimationFrame": { + "Web/API/Window/requestAnimationFrame": { "modified": "2020-11-28T11:54:08.634Z", "contributors": [ "bulk88", diff --git a/files/en-us/games/techniques/3d_on_the_web/building_up_a_basic_demo_with_three.js/index.md b/files/en-us/games/techniques/3d_on_the_web/building_up_a_basic_demo_with_three.js/index.md index 47c4555a16ba567..961c6076497769b 100644 --- a/files/en-us/games/techniques/3d_on_the_web/building_up_a_basic_demo_with_three.js/index.md +++ b/files/en-us/games/techniques/3d_on_the_web/building_up_a_basic_demo_with_three.js/index.md @@ -113,7 +113,7 @@ You should experiment with these values and see how they change what you see in ## Rendering the scene -Everything is ready, but we still can't see anything. Although we've set up the renderer, we still need to render everything. Our `render()` function will do this job, with a little help from [`requestAnimationFrame()`](/en-US/docs/Web/API/window/requestAnimationFrame), which causes the scene to be re-rendered constantly on every frame: +Everything is ready, but we still can't see anything. Although we've set up the renderer, we still need to render everything. Our `render()` function will do this job, with a little help from [`requestAnimationFrame()`](/en-US/docs/Web/API/Window/requestAnimationFrame), which causes the scene to be re-rendered constantly on every frame: ```js function render() { diff --git a/files/en-us/games/techniques/control_mechanisms/desktop_with_mouse_and_keyboard/index.md b/files/en-us/games/techniques/control_mechanisms/desktop_with_mouse_and_keyboard/index.md index d91fb6b9fc23463..00d05e0f6919379 100644 --- a/files/en-us/games/techniques/control_mechanisms/desktop_with_mouse_and_keyboard/index.md +++ b/files/en-us/games/techniques/control_mechanisms/desktop_with_mouse_and_keyboard/index.md @@ -71,7 +71,7 @@ function draw() { } ``` -The `draw` function first clears the whole Canvas — we draw everything from scratch on every single frame. Then the pressed key variables are checked and the `playerX` and `playerY` variables (that we define earlier just after `leftPressed` and the others) holding the position of the ship are adjusted by a given amount, let's say 5 pixels. Then the player's ship is drawn on the screen and the next draw is called from within the [requestAnimationFrame](/en-US/docs/Web/API/window/requestAnimationFrame). +The `draw` function first clears the whole Canvas — we draw everything from scratch on every single frame. Then the pressed key variables are checked and the `playerX` and `playerY` variables (that we define earlier just after `leftPressed` and the others) holding the position of the ship are adjusted by a given amount, let's say 5 pixels. Then the player's ship is drawn on the screen and the next draw is called from within the [requestAnimationFrame](/en-US/docs/Web/API/Window/requestAnimationFrame). We could write our own `KeyCode` object containing the key codes. For example: diff --git a/files/en-us/glossary/accessibility_tree/index.md b/files/en-us/glossary/accessibility_tree/index.md index 62c2f163985a7db..699f0c4ef700936 100644 --- a/files/en-us/glossary/accessibility_tree/index.md +++ b/files/en-us/glossary/accessibility_tree/index.md @@ -8,7 +8,7 @@ page-type: glossary-definition The **accessibility tree** contains {{Glossary("accessibility")}}-related information for most HTML elements. -Browsers convert markup into an internal representation called the _[DOM tree](/en-US/docs/Web/API/Document_object_model/How_to_create_a_DOM_tree)_. The DOM tree contains objects representing all the markup's elements, attributes, and text nodes. Browsers then create an accessibility tree based on the DOM tree, which is used by platform-specific Accessibility APIs to provide a representation that can be understood by assistive technologies, such as screen readers. +Browsers convert markup into an internal representation called the _[DOM tree](/en-US/docs/Web/API/Document_Object_Model/How_to_create_a_DOM_tree)_. The DOM tree contains objects representing all the markup's elements, attributes, and text nodes. Browsers then create an accessibility tree based on the DOM tree, which is used by platform-specific Accessibility APIs to provide a representation that can be understood by assistive technologies, such as screen readers. There are four properties in an accessibility tree object: diff --git a/files/en-us/glossary/bidi/index.md b/files/en-us/glossary/bidi/index.md index bc8f7487f411784..a1b398d16b44605 100644 --- a/files/en-us/glossary/bidi/index.md +++ b/files/en-us/glossary/bidi/index.md @@ -6,8 +6,16 @@ page-type: glossary-definition {{GlossarySidebar}} -**BiDi** (BiDirectional) refers to a document containing both right-to-left and left-to-right text. Even when both directionalities occur in the same paragraph, the text in each language must appear in its proper directionality. +**BiDi** (BiDirectional) describes a document that contains both right-to-left (RTL) and left-to-right (LTR) text. + +User Interfaces should display BiDi content correctly, but many fail. An example is the Hebrew translation of the name Sarah: שרה, spelled (from right-to-left) sin (ש), resh (ר), heh (ה). Many programs would display the letters in the opposite order. + +It is possible to flip the left-to-right display order to a right-to-left display order, but doing this sacrifices the ability to display BiDi scripts correctly — at least one is always incorrectly displayed. With bidirectional script support, it is possible to mix characters from different scripts on the same page, regardless of writing direction. + +The Unicode standard provides foundations for complete BiDi support, with detailed rules as to how mixtures of left-to-right and right-to-left scripts are to be encoded and displayed. ## See also +- {{glossary("Unicode")}} - [Bi-directional text](https://en.wikipedia.org/wiki/Bi-directional_text) on Wikipedia +- [UAX#9: Unicode Bi-directional Algorithm](https://www.unicode.org/reports/tr9) diff --git a/files/en-us/glossary/digital_signature/index.md b/files/en-us/glossary/digital_signature/index.md new file mode 100644 index 000000000000000..017da3c86d5e564 --- /dev/null +++ b/files/en-us/glossary/digital_signature/index.md @@ -0,0 +1,29 @@ +--- +title: Digital signature +slug: Glossary/Digital_signature +page-type: glossary-definition +--- + +{{GlossarySidebar}} + +A **digital signature** is an object that can be used to {{glossary("authentication", "authenticate")}} the author of a document or message. + +Digital signatures are usually based on {{glossary("public-key cryptography")}}, in which a key is created as a pair of keys, with the property that, if some input is encrypted with one key, it can only be decrypted with the other key, and vice versa. + +The creator of the key pair makes one of the keys public and keeps the other one private. To sign a document, the key pair's owner creates a {{glossary("hash")}} of the document and encrypts it with the private key. + +The document and signature are sent to the verifier, who hashes the document, retrieves the public key, and decrypts the signature: if this matches the hash, then the signature has been verified, and the verifier can be confident that it was created by an entity with access to the private key. + +The security of a digital signature system depends (among other things) on: + +- The private key's owner keeping it safe: if other entities can access the private key, they can impersonate the owner. + +- The public key used by the verifier being the genuine counterpart of the owner's private key: if an attacker could trick the verifier into trusting the wrong public key, they could impersonate the owner. + +Verifiers often use {{glossary("digital certificate", "digital certificates")}} to check that public keys are genuine. + +## See also + +- {{glossary("Digital certificate")}} +- {{glossary("Hash")}} +- {{glossary("Public-key cryptography")}} diff --git a/files/en-us/glossary/federated_identity/index.md b/files/en-us/glossary/federated_identity/index.md new file mode 100644 index 000000000000000..0594fef38d341cc --- /dev/null +++ b/files/en-us/glossary/federated_identity/index.md @@ -0,0 +1,30 @@ +--- +title: Federated identity +slug: Glossary/Federated_identity +page-type: glossary-definition +--- + +{{GlossarySidebar}} + +A **federated identity** system is one in which an {{glossary("identity provider", "identity provider (IdP)")}} acts as an intermediary between users and {{glossary("relying party", "relying parties")}}, enabling a user to use a single set of {{glossary("credential", "credentials")}} to authenticate with a number of different relying parties. + +Traditionally, on the web, a user will sign into a website with a username and a password, and the password is verified by the website against a (properly {{glossary("hash", "hashed")}} and {{glossary("salt", "salted")}}) copy stored on the website's backend. + +In this model, if users have multiple accounts with different websites, they have to remember many passwords, and this encourages bad password practices such as using the same password for multiple accounts. + +In a federated identity system, an identity provider: + +- manages a user's credentials and can authenticate users +- is trusted by multiple websites to make assertions about a user's identity. + +A user can then authenticate with the identity provider, which will return a token to the user's browser if authentication is successful. The user's browser will send the token to the website, which can verify that it was issued by the IdP. If the verification succeeds, the website can sign the user in. + +Federated identity is often provided as a service by corporations: for example, users who have Google, Microsoft, or Facebook accounts can use them to sign in to many websites. Websites typically have to implement a process for verifying tokens that is specific to an identity provider. However, open standards such as [OpenID](https://en.wikipedia.org/wiki/OpenID), [OAuth](https://en.wikipedia.org/wiki/OAuth), and [SAML](https://en.wikipedia.org/wiki/Security_Assertion_Markup_Language) are widely used in the implementation of federated identity systems. + +Although federated identity makes logging into multiple different accounts much easier for users and can greatly improve security, it can have serious implications for a user's privacy. If not carefully designed, a federated identity system can allow identity providers to track users across the web as they sign into multiple different sites. Early federated identity systems on the web were built on technologies such as third-party cookies, which are intrinsically privacy-invasive. As these technologies are being deprecated by browsers, new approaches are needed. The [Federated Credential Management (FedCM) API](/en-US/docs/Web/API/FedCM_API) provides a standardized privacy-preserving mechanism for federated identity on the web. + +## See also + +- {{glossary("Relying party")}} +- {{glossary("Identity provider")}} +- [Federated Credential Management (FedCM) API](/en-US/docs/Web/API/FedCM_API) diff --git a/files/en-us/glossary/hmac/index.md b/files/en-us/glossary/hmac/index.md index c28c54da1691d0c..0d5c5c374b2aae1 100644 --- a/files/en-us/glossary/hmac/index.md +++ b/files/en-us/glossary/hmac/index.md @@ -15,4 +15,4 @@ HMAC is used to ensure both integrity and authentication. ## See also - [HMAC](https://en.wikipedia.org/wiki/Hash-based_message_authentication_code) on Wikipedia -- [RFC 2104](https://www.ietf.org/rfc/rfc2104.txt) on IETF +- [RFC 2104](https://datatracker.ietf.org/doc/html/rfc2104) on IETF diff --git a/files/en-us/glossary/identity_provider/index.md b/files/en-us/glossary/identity_provider/index.md new file mode 100644 index 000000000000000..1e8231a3b0636bc --- /dev/null +++ b/files/en-us/glossary/identity_provider/index.md @@ -0,0 +1,19 @@ +--- +title: Identity provider (IdP) +slug: Glossary/Identity_provider +page-type: glossary-definition +--- + +{{GlossarySidebar}} + +An **identity provider** (IdP) is an entity in a {{glossary("federated identity")}} system that manages a user's {{glossary("credential", "credentials")}} and can {{glossary("authentication", "authenticate")}} users. + +In federated identity systems, {{glossary("relying party", "relying parties")}}, that need to control access to a resource (for example, a website deciding whether to sign a user in) outsource the act of authenticating users to a third party, which they trust to make authentication decisions. These third parties are called identity providers. + +Examples of identity providers on the web include Google, Microsoft, and Facebook. This enables websites to allow users to sign in using the user's Google, Microsoft, or Facebook account. + +## See also + +- {{glossary("Federated identity")}} +- {{glossary("Relying party")}} +- [Federated Credential Management (FedCM) API](/en-US/docs/Web/API/FedCM_API) diff --git a/files/en-us/glossary/relying_party/index.md b/files/en-us/glossary/relying_party/index.md new file mode 100644 index 000000000000000..7ec24306d068897 --- /dev/null +++ b/files/en-us/glossary/relying_party/index.md @@ -0,0 +1,16 @@ +--- +title: Relying party +slug: Glossary/Relying_party +page-type: glossary-definition +--- + +{{GlossarySidebar}} + +A **relying party** is an entity that needs to control access to a resource and, to do so, needs to {{glossary("authentication", "authenticate")}} other entities that are trying to access that resource. On the web, a relying party is usually a website that allows users to sign in and needs to authenticate users (for example by checking a password) before deciding whether to grant them access. + +The website _relies on_ the validity of the credentials the browser presents when it grants access to its resources. + +## See also + +- {{glossary("Federated identity")}} +- {{glossary("Identity provider")}} diff --git a/files/en-us/glossary/salt/index.md b/files/en-us/glossary/salt/index.md new file mode 100644 index 000000000000000..a368f2257d13273 --- /dev/null +++ b/files/en-us/glossary/salt/index.md @@ -0,0 +1,25 @@ +--- +title: Salt +slug: Glossary/Salt +page-type: glossary-definition +--- + +{{GlossarySidebar}} + +In cryptography, **salt** is random data added to a password before it is {{glossary("hash", "hashed")}}. This makes it impossible for an attacker to derive passwords from their hashes using precomputed tables of passwords and the corresponding hashes. + +Passwords should never be stored in their plaintext form, because of the risk that an attacker might break into the database where they are stored. Typically, the password is hashed, and the resulting hash is stored. If the hash function is cryptographically secure, then even if an attacker can get access to the stored hashes, it is impractical for them to reverse the function. + +To derive a password from a hash, attackers can look up the password corresponding to a hash in a precomputed table (also known as a [rainbow table](https://en.wikipedia.org/wiki/Rainbow_table)) mapping possible passwords to their hashes: + +| Password | Hash | +| -------- | ----------- | +| pa55w0rd | 56965E2A... | +| abcdef | BEF57EC7... | +| letmein | 1C8BFE8F... | + +Although these tables may be very large, such attacks can be effective because table lookup is a fast operation. + +Adding random salt to passwords before hashing them stops this attack from working because the hash is not calculated based on the password alone but on the password combined with the salt. + +Unlike the password, the salt does not need to be kept secret: it can be stored alongside the salted and hashed password in the server's database. diff --git a/files/en-us/glossary/stringifier/index.md b/files/en-us/glossary/stringifier/index.md index a28e5fa955b3180..816aa7f3a43a6c5 100644 --- a/files/en-us/glossary/stringifier/index.md +++ b/files/en-us/glossary/stringifier/index.md @@ -10,4 +10,4 @@ An {{Glossary("object", "object's")}} stringifier is any {{Glossary("attribute") ## See also -- Stringifiers in [Information contained in a WebIDL file](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file#stringifiers) +- Stringifiers in [Information contained in a WebIDL file](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file#stringifiers) diff --git a/files/en-us/glossary/turn/index.md b/files/en-us/glossary/turn/index.md index 455f9a88ee1fe55..7456a6346474f9f 100644 --- a/files/en-us/glossary/turn/index.md +++ b/files/en-us/glossary/turn/index.md @@ -12,5 +12,5 @@ page-type: glossary-definition - [TURN](https://en.wikipedia.org/wiki/TURN) on Wikipedia - [WebRTC protocols](/en-US/docs/Web/API/WebRTC_API/Protocols) -- [Specification](https://www.ietf.org/rfc/rfc5766.txt) -- [Specification update for IPv6](https://www.ietf.org/rfc/rfc6156.txt) +- [Specification](https://datatracker.ietf.org/doc/html/rfc5766) +- [Specification update for IPv6](https://datatracker.ietf.org/doc/html/rfc6156.txt) diff --git a/files/en-us/glossary/urn/index.md b/files/en-us/glossary/urn/index.md index 4f1674ec9326b56..b136a55f068224e 100644 --- a/files/en-us/glossary/urn/index.md +++ b/files/en-us/glossary/urn/index.md @@ -6,7 +6,7 @@ page-type: glossary-definition {{GlossarySidebar}} -URN (Uniform Resource Name) is a {{Glossary("URI")}} in a standard format, referring to a resource without specifying its location or whether it exists. This example comes from [RFC3986](https://www.ietf.org/rfc/rfc3986.txt): `urn:oasis:names:specification:docbook:dtd:xml:4.1.2` +URN (Uniform Resource Name) is a {{Glossary("URI")}} in a standard format, referring to a resource without specifying its location or whether it exists. This example comes from [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986): `urn:oasis:names:specification:docbook:dtd:xml:4.1.2` ## See also diff --git a/files/en-us/glossary/vendor_prefix/index.md b/files/en-us/glossary/vendor_prefix/index.md index fa89f62ee284f4b..5d7cf8ece8803ef 100644 --- a/files/en-us/glossary/vendor_prefix/index.md +++ b/files/en-us/glossary/vendor_prefix/index.md @@ -70,7 +70,7 @@ window.requestAnimationFrame = window.msRequestAnimationFrame; ``` -If you encounter the above code in a code base, you can safely remove all but the first line. All browsers support [`requestAnimationFrame`](/en-US/docs/Web/API/window/requestAnimationFrame#browser_compatibility) without vendor prefixes, and without `window`: +If you encounter the above code in a code base, you can safely remove all but the first line. All browsers support [`requestAnimationFrame`](/en-US/docs/Web/API/Window/requestAnimationFrame#browser_compatibility) without vendor prefixes, and without `window`: ```js requestAnimationFrame(callback); diff --git a/files/en-us/glossary/webidl/index.md b/files/en-us/glossary/webidl/index.md index 9c69f377d39900b..95c6cb92fb6c2c6 100644 --- a/files/en-us/glossary/webidl/index.md +++ b/files/en-us/glossary/webidl/index.md @@ -13,6 +13,6 @@ WebIDL is used in nearly every API {{Glossary("specification")}} for the Web, an ## See also - [Specification](https://webidl.spec.whatwg.org/) -- [Information contained in a WebIDL file](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file) +- [Information contained in a WebIDL file](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file) - [Gecko WebIDL bindings](https://firefox-source-docs.mozilla.org/dom/webIdlBindings/index.html) - [WebIDL](https://en.wikipedia.org/wiki/WebIDL) diff --git a/files/en-us/glossary/webm/index.md b/files/en-us/glossary/webm/index.md index ea16adc3632bd01..bfc2e64cef47206 100644 --- a/files/en-us/glossary/webm/index.md +++ b/files/en-us/glossary/webm/index.md @@ -6,7 +6,7 @@ page-type: glossary-definition {{GlossarySidebar}} -**WebM** is royalty-free and is an open web video format natively supported in Mozilla Firefox. +**[WebM](/en-US/docs/Web/Media/Formats/Containers#webm)** is a royalty-free and open web video format, which is natively supported in all modern browsers. ## See also diff --git a/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/index.md b/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/index.md index cce873cb5e88466..f685d1f4ed55017 100644 --- a/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/index.md +++ b/files/en-us/learn/common_questions/tools_and_setup/what_are_browser_developer_tools/index.md @@ -26,7 +26,7 @@ How do you pull it up? Three ways: - **_Menu bar:_** - - **Firefox:** Menu ![Firefox hamburger menu icon that has more options to customize and control Firefox.](2014-01-10-13-08-08-f52b8c.png) _➤ Web Developer ➤ Toggle Tools,_ or _Tools ➤_ _Web Developer ➤ Toggle Tools_ + - **Firefox:** Menu ![Firefox hamburger menu icon that has more options to customize and control Firefox.](2014-01-10-13-08-08-f52b8c.png) _➤ More tools ➤ Web Developer Tools_ - **Chrome:** _More tools ➤ Developer tools_ - **Safari:** _Develop ➤ Show Web Inspector._ If you can't see the _Develop_ menu, go to _Safari ➤ Preferences ➤ Advanced_, and check the _Show Develop menu in menu bar_ checkbox. - **Opera**: _Developer ➤ Developer tools_ diff --git a/files/en-us/learn/forms/styling_web_forms/index.md b/files/en-us/learn/forms/styling_web_forms/index.md index 86820abb102e3fc..52835034617ff57 100644 --- a/files/en-us/learn/forms/styling_web_forms/index.md +++ b/files/en-us/learn/forms/styling_web_forms/index.md @@ -32,7 +32,7 @@ In the previous few articles, we showed how to create web forms in HTML. Now, we ### History -In 1995, [the HTML 2 specification](https://www.ietf.org/rfc/rfc1866.txt) introduced form controls (a.k.a. "form widgets", or "form elements"). But CSS wasn't released until late 1996, and wasn't supported by most browsers until years afterward; so, in the interim, browsers relied on the underlying operating system to render form widgets. +In 1995, [the HTML 2 specification](https://datatracker.ietf.org/doc/html/rfc1866) introduced form controls (a.k.a. "form widgets", or "form elements"). But CSS wasn't released until late 1996, and wasn't supported by most browsers until years afterward; so, in the interim, browsers relied on the underlying operating system to render form widgets. Even with CSS available, browser vendors were reluctant at first to make form elements stylable, because users were so accustomed to the looks of their respective browsers. But things have changed, and forms widgets are now mostly stylable, with a few exceptions. diff --git a/files/en-us/learn/javascript/objects/object_building_practice/index.md b/files/en-us/learn/javascript/objects/object_building_practice/index.md index 15dd04e9ce559bd..a40806031c8b22e 100644 --- a/files/en-us/learn/javascript/objects/object_building_practice/index.md +++ b/files/en-us/learn/javascript/objects/object_building_practice/index.md @@ -40,7 +40,7 @@ In this article we will write a classic "bouncing balls" demo, to show you how u ![Screenshot of a webpage titled "Bouncing balls". 23 balls of various pastel colors and sizes are visible across a black screen with long trails behind them indicating motion.](bouncing-balls.png) -This example will make use of the [Canvas API](/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Drawing_graphics) for drawing the balls to the screen, and the [`requestAnimationFrame`](/en-US/docs/Web/API/window/requestAnimationFrame) API for animating the whole display — you don't need to have any previous knowledge of these APIs, and we hope that by the time you've finished this article you'll be interested in exploring them more. Along the way, we'll make use of some nifty objects, and show you a couple of nice techniques like bouncing balls off walls, and checking whether they have hit each other (otherwise known as _collision detection_). +This example will make use of the [Canvas API](/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Drawing_graphics) for drawing the balls to the screen, and the [`requestAnimationFrame`](/en-US/docs/Web/API/Window/requestAnimationFrame) API for animating the whole display — you don't need to have any previous knowledge of these APIs, and we hope that by the time you've finished this article you'll be interested in exploring them more. Along the way, we'll make use of some nifty objects, and show you a couple of nice techniques like bouncing balls off walls, and checking whether they have hit each other (otherwise known as _collision detection_). ## Getting started @@ -311,7 +311,7 @@ That's it for object articles — all that remains now is for you to test your s ## See also - [Canvas tutorial](/en-US/docs/Web/API/Canvas_API/Tutorial) — a beginner's guide to using 2D canvas. -- [requestAnimationFrame()](/en-US/docs/Web/API/window/requestAnimationFrame) +- [requestAnimationFrame()](/en-US/docs/Web/API/Window/requestAnimationFrame) - [2D collision detection](/en-US/docs/Games/Techniques/2D_collision_detection) - [3D collision detection](/en-US/docs/Games/Techniques/3D_collision_detection) - [2D breakout game using pure JavaScript](/en-US/docs/Games/Tutorials/2D_Breakout_game_pure_JavaScript) — a great beginner's tutorial showing how to build a 2D game. diff --git a/files/en-us/learn/tools_and_testing/cross_browser_testing/accessibility/index.md b/files/en-us/learn/tools_and_testing/cross_browser_testing/accessibility/index.md index 290faef1f74e7fc..89b5d9198c57898 100644 --- a/files/en-us/learn/tools_and_testing/cross_browser_testing/accessibility/index.md +++ b/files/en-us/learn/tools_and_testing/cross_browser_testing/accessibility/index.md @@ -131,8 +131,7 @@ You can then press Enter/Return to follow a focused link or press a button (we'v Note that different browsers may have different keyboard control options available. Most modern browsers follow the tab pattern described above (you can also do Shift + Tab to move backwards through the focusable elements), but some browsers have their own idiosyncrasies: -- Firefox for the Mac doesn't do tabbing by default. To turn it on, you have to go to _Preferences > Advanced > General_, then uncheck "Always use the cursor keys to navigate within pages". Next, you have to open your Mac's System Preferences app, then go to _Keyboard > Shortcuts_, then select the _All Controls_ radio button. -- Safari doesn't allow you to tab through links by default; to enable this, you need to open Safari's _Preferences_, go to Advanced, and check the _Press Tab to highlight each item on a webpage_ checkbox. +- Safari on Mac doesn't allow you to tab through links by default; to enable this, open _System Settings_, scroll down to _Keyboard_, and enable _Keyboard navigation_. If you're using an older version of macOS, see [Use your keyboard like a mouse with Mac](https://support.apple.com/en-is/guide/mac-help/mchlp1399/mac) on Apple's macOS User Guide. > **Warning:** You should perform this kind of test/review on any new page you write — make sure that functionality can be accessed by the keyboard, and that the tab order provides a sensible navigation path through the document. diff --git a/files/en-us/mdn/changelog/index.md b/files/en-us/mdn/changelog/index.md index 9dbb55e3ca272fe..0cd3765e74ab63f 100644 --- a/files/en-us/mdn/changelog/index.md +++ b/files/en-us/mdn/changelog/index.md @@ -56,7 +56,7 @@ before linking to those from the landing pages of the interfaces that implement This was confusing for readers because mixins are spec constructs — you never access the defined members using the mixin classes. To avoid this confusion we've instead put the pages for members defined on mixins directly under the implementing class pages. For more details, see the guide page on -[how to write an API reference](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file#mixins) +[how to write an API reference](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file#mixins) and the discussion leading to this change at [mdn/content#1940](https://github.com/mdn/content/issues/1940). ## January 2021 diff --git a/files/en-us/mdn/writing_guidelines/howto/research_technology/index.md b/files/en-us/mdn/writing_guidelines/howto/research_technology/index.md index e6376ba9c7af842..d1eaf778c62a6f5 100644 --- a/files/en-us/mdn/writing_guidelines/howto/research_technology/index.md +++ b/files/en-us/mdn/writing_guidelines/howto/research_technology/index.md @@ -39,7 +39,7 @@ This can feel a little alien to start, but the more you do it the more you get u - [How to read web specs part I – or: WebVR, how do you work?](https://surma.dev/things/reading-specs/) talks through reading the WebVR spec specifically, but is a great introduction to reading Web API specs. - [How to read web specs part IIa – or: ECMAScript Symbols](https://surma.dev/things/reading-specs-2/) the second part to the link above contains information on understanding the ECMAScript specification which outlines the JavaScript language -In addition, we have the [Information contained in a WebIDL file](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file) guide, which can really help when reading Web API specs. +In addition, we have the [Information contained in a WebIDL file](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file) guide, which can really help when reading Web API specs. ## Exploring the feature @@ -54,7 +54,7 @@ The different pages that you need to write from scratch or update varies dependi ### Sidebars -It's possible that the sidebar of the pages you write will also need to be defined or updated. To find out if this is needed and how to do it, check out the [sidebar guide](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars). +It's possible that the sidebar of the pages you write will also need to be defined or updated. To find out if this is needed and how to do it, check out the [sidebar guide](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars). ### Code examples diff --git a/files/en-us/mdn/writing_guidelines/howto/write_an_api_reference/index.md b/files/en-us/mdn/writing_guidelines/howto/write_an_api_reference/index.md index 6065d08f519fdb4..19411a7bfb64c5a 100644 --- a/files/en-us/mdn/writing_guidelines/howto/write_an_api_reference/index.md +++ b/files/en-us/mdn/writing_guidelines/howto/write_an_api_reference/index.md @@ -101,7 +101,7 @@ Examples: On the rare occasions that they both exist on the same interface, you should list them in separate sections on the page (Static methods/Instance methods). Usually only instance methods exist, in which case you can put these under the title "Methods". - We do not document inherited properties and methods of the interface: they are listed on the respective parent interface. We do hint at their existence though. -- We do document properties and methods defined in mixins. Please see the [contribution guide for mixins](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file#mixins) for more details. +- We do document properties and methods defined in mixins. Please see the [contribution guide for mixins](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file#mixins) for more details. - Special methods like the stringifier (`toString()`) and the jsonizer (`toJSON()`) are also listed if they do exist. - Named constructors (like `Image()` for {{domxref("HTMLImageElement")}}) are also listed, if relevant. @@ -339,4 +339,4 @@ The following are exemplary examples of method pages: ## Sidebars -Once you've created your API reference pages, you'll want to insert the correct sidebars on them to associate the pages together. Our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars) guide explains how. +Once you've created your API reference pages, you'll want to insert the correct sidebars on them to associate the pages together. Our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars) guide explains how. diff --git a/files/en-us/mdn/writing_guidelines/howto/write_an_api_reference/information_contained_in_a_webidl_file/index.md b/files/en-us/mdn/writing_guidelines/howto/write_an_api_reference/information_contained_in_a_webidl_file/index.md index 5e418d195eb1f07..c965ada64d46a5a 100644 --- a/files/en-us/mdn/writing_guidelines/howto/write_an_api_reference/information_contained_in_a_webidl_file/index.md +++ b/files/en-us/mdn/writing_guidelines/howto/write_an_api_reference/information_contained_in_a_webidl_file/index.md @@ -1,6 +1,6 @@ --- title: Information contained in a WebIDL file -slug: MDN/Writing_guidelines/Howto/Write_an_API_reference/Information_contained_in_a_WebIDL_file +slug: MDN/Writing_guidelines/Howto/Write_an_api_reference/Information_contained_in_a_WebIDL_file page-type: mdn-writing-guide --- diff --git a/files/en-us/mdn/writing_guidelines/howto/write_an_api_reference/sidebars/index.md b/files/en-us/mdn/writing_guidelines/howto/write_an_api_reference/sidebars/index.md index 1e797d8f59ebff0..25a6135a0ab80cb 100644 --- a/files/en-us/mdn/writing_guidelines/howto/write_an_api_reference/sidebars/index.md +++ b/files/en-us/mdn/writing_guidelines/howto/write_an_api_reference/sidebars/index.md @@ -1,6 +1,6 @@ --- title: API reference sidebars -slug: MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars +slug: MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars page-type: mdn-writing-guide --- diff --git a/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_constructor_subpage_template/index.md b/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_constructor_subpage_template/index.md index d26d3d7c1f12245..be91621353f30ec 100644 --- a/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_constructor_subpage_template/index.md +++ b/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_constructor_subpage_template/index.md @@ -69,7 +69,7 @@ browser-compat: path.to.feature.NameOfTheConstructor > - `\{{APIRef("GroupDataName")}}` — this generates the left-hand reference sidebar showing quick reference links related to the current page. > For example, every page in the [WebVR API](/en-US/docs/Web/API/WebVR_API) has the same sidebar, which points to the other pages in the API. > To generate the correct sidebar for your API, you need to add a `GroupData` entry to our GitHub repo, and include the entry's name inside the macro call in place of _GroupDataName_. -> See our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars) guide for information on how to do this. Remember to remove the `\{{MDNSidebar}}` macro when you copy this page. +> See our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars) guide for information on how to do this. Remember to remove the `\{{MDNSidebar}}` macro when you copy this page. > > Do not provide status header macros manually. Refer to the section [How to add or update feature statuses](/en-US/docs/MDN/Writing_guidelines/Page_structures/Feature_status#how_to_add_or_update_feature_statuses) to add these statuses to the page. > diff --git a/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_event_subpage_template/index.md b/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_event_subpage_template/index.md index da2a94a4692f466..21ee6eff8bbba9c 100644 --- a/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_event_subpage_template/index.md +++ b/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_event_subpage_template/index.md @@ -68,7 +68,7 @@ browser-compat: path.to.feature.NameOfTheEvent_event > - `\{{APIRef("GroupDataName")}}` — this generates the left-hand reference sidebar showing quick reference links related to the current page. > For example, every page in the [WebVR API](/en-US/docs/Web/API/WebVR_API) has the same sidebar, which points to the other pages in the API. > To generate the correct sidebar for your API, you need to add a `GroupData` entry to our GitHub repo, and include the entry's name inside the macro call in place of _GroupDataName_. -> See our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars) guide for information on how to do this. Remember to remove the `\{{MDNSidebar}}` macro when you copy this page. +> See our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars) guide for information on how to do this. Remember to remove the `\{{MDNSidebar}}` macro when you copy this page. > > Do not provide status header macros manually. Refer to the section ["How to add or update feature statuses"](/en-US/docs/MDN/Writing_guidelines/Page_structures/Feature_status#how_to_add_or_update_feature_statuses) to add these statuses to the page. > diff --git a/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_landing_page_template/index.md b/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_landing_page_template/index.md index dc9d625cd3b4db7..ad2c9375176f61a 100644 --- a/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_landing_page_template/index.md +++ b/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_landing_page_template/index.md @@ -60,7 +60,7 @@ page-type: mdn-writing-guide > - `\{{APIRef("GroupDataName")}}` — this generates the left-hand reference sidebar showing quick reference links related to the current page. > For example, every page in the [WebVR API](/en-US/docs/Web/API/WebVR_API) has the same sidebar, which points to the other pages in the API. > To generate the correct sidebar for your API, you need to add a `GroupData` entry to our GitHub repo, and include the entry's name inside the macro call in place of _GroupDataName_. -> See our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars) guide for information on how to do this. +> See our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars) guide for information on how to do this. > - Remember to remove the `\{{MDNSidebar}}` macro when you copy this page. > > Do not provide status header macros manually. Refer to the section ["How to add or update feature statuses"](/en-US/docs/MDN/Writing_guidelines/Page_structures/Feature_status#how_to_add_or_update_feature_statuses) to add these statuses to the page. diff --git a/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_method_subpage_template/index.md b/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_method_subpage_template/index.md index eb78bf3daaf3a93..2857ea727745bfd 100644 --- a/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_method_subpage_template/index.md +++ b/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_method_subpage_template/index.md @@ -74,7 +74,7 @@ browser-compat: path.to.feature.NameOfTheMethod > - `\{{APIRef("GroupDataName")}}` — this generates the left-hand reference sidebar showing quick reference links related to the current page. > For example, every page in the [WebVR API](/en-US/docs/Web/API/WebVR_API) has the same sidebar, which points to the other pages in the API. > To generate the correct sidebar for your API, you need to add a `GroupData` entry to our GitHub repo, and include the entry's name inside the macro call in place of _GroupDataName_. -> See our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars) guide for information on how to do this. Remember to remove the `\{{MDNSidebar}}` macro when you copy this page. +> See our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars) guide for information on how to do this. Remember to remove the `\{{MDNSidebar}}` macro when you copy this page. > > Do not provide status header macros manually. Refer to the section ["How to add or update feature statuses"](/en-US/docs/MDN/Writing_guidelines/Page_structures/Feature_status#how_to_add_or_update_feature_statuses) to add these statuses to the page. > diff --git a/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_property_subpage_template/index.md b/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_property_subpage_template/index.md index b902567cb57dece..cdec1cea989d8a7 100644 --- a/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_property_subpage_template/index.md +++ b/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_property_subpage_template/index.md @@ -72,7 +72,7 @@ browser-compat: path.to.feature.NameOfTheProperty > - `\{{APIRef("GroupDataName")}}` — this generates the left-hand reference sidebar showing quick reference links related to the current page. > For example, every page in the [WebVR API](/en-US/docs/Web/API/WebVR_API) has the same sidebar, which points to the other pages in the API. > To generate the correct sidebar for your API, you need to add a `GroupData` entry to our GitHub repo, and include the entry's name inside the macro call in place of _GroupDataName_. -> See our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars) guide for information on how to do this. Remember to remove the `\{{MDNSidebar}}` macro when you copy this page. +> See our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars) guide for information on how to do this. Remember to remove the `\{{MDNSidebar}}` macro when you copy this page. > > Do not provide status header macros manually. Refer to the section ["How to add or update feature statuses"](/en-US/docs/MDN/Writing_guidelines/Page_structures/Feature_status#how_to_add_or_update_feature_statuses) to add these statuses to the page. > diff --git a/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_reference_page_template/index.md b/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_reference_page_template/index.md index a061895460a90a6..009938704e0c59a 100644 --- a/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_reference_page_template/index.md +++ b/files/en-us/mdn/writing_guidelines/page_structures/page_types/api_reference_page_template/index.md @@ -51,7 +51,7 @@ browser-compat: path.to.feature.NameOfTheInterface > > By default, there are five macro calls at the top of a template. You should update or delete them according to the advice below. > -> - `\{{APIRef("GroupDataName")}}` — this generates the left-hand reference sidebar showing quick reference links related to the current page. For example, every page in the [WebVR API](/en-US/docs/Web/API/WebVR_API) has the same sidebar, which points to the other pages in the API. To generate the correct sidebar for your API, you need to add a GroupData entry to our KumaScript GitHub repo, and include the entry's name inside the macro call in place of _GroupDataName_. See our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_API_reference/Sidebars) guide for information on how to do this. +> - `\{{APIRef("GroupDataName")}}` — this generates the left-hand reference sidebar showing quick reference links related to the current page. For example, every page in the [WebVR API](/en-US/docs/Web/API/WebVR_API) has the same sidebar, which points to the other pages in the API. To generate the correct sidebar for your API, you need to add a GroupData entry to our KumaScript GitHub repo, and include the entry's name inside the macro call in place of _GroupDataName_. See our [API reference sidebars](/en-US/docs/MDN/Writing_guidelines/Howto/Write_an_api_reference/Sidebars) guide for information on how to do this. > - `\{{SeeCompatTable}}` — this generates a **This is an experimental technology** banner that indicates the technology is [experimental](/en-US/docs/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental). If it is experimental, and the technology is hidden behind a pref in Firefox, you should also fill in an entry for it in the [Experimental features in Firefox](/en-US/docs/Mozilla/Firefox/Experimental_features) page. > - `\{{Deprecated_Header}}` — this generates a **Deprecated** banner that indicates the technology is [deprecated](/en-US/docs/MDN/Writing_guidelines/Experimental_deprecated_obsolete#deprecated). > - `\{{Non-standard_Header}}` — this generates a **Non-standard** banner that indicates that the feature is not part of any specification. diff --git a/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/getdynamicrules/index.md b/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/getdynamicrules/index.md index 2270f850661e2d6..8fd2c1b47124fe1 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/getdynamicrules/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/getdynamicrules/index.md @@ -17,7 +17,11 @@ let gettingDynamicRules = browser.declarativeNetRequest.getDynamicRules(); ### Parameters -This function takes no parameters. +- `filter` {{optional_inline}} + + - : An object to filter the list of returned rules. + - `ruleIds` {{optional_inline}} + - : An array of `integer`. The IDs of the rules to return. ### Return value diff --git a/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/getsessionrules/index.md b/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/getsessionrules/index.md index afedf8426664353..c8ce17d07f6e4fe 100644 --- a/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/getsessionrules/index.md +++ b/files/en-us/mozilla/add-ons/webextensions/api/declarativenetrequest/getsessionrules/index.md @@ -17,7 +17,11 @@ let sessionRules = await browser.declarativeNetRequest.getSessionRules(); ### Parameters -This function takes no parameters. +- `filter` {{optional_inline}} + + - : An object to filter the list of returned rules. + - `ruleIds` {{optional_inline}} + - : An array of `integer`. The IDs of the rules to return. ### Return value diff --git a/files/en-us/mozilla/firefox/releases/127/index.md b/files/en-us/mozilla/firefox/releases/127/index.md index 3d7bd9e31402d85..d4ccf20e88fe56b 100644 --- a/files/en-us/mozilla/firefox/releases/127/index.md +++ b/files/en-us/mozilla/firefox/releases/127/index.md @@ -70,6 +70,9 @@ This article provides information about the changes in Firefox 127 that affect d ## Changes for add-on developers +- {{WebExtAPIRef("management.ExtensionInfo")}} now returns the `install_type` of `"admin"` when an add-on is installed using an enterprise policy ([Firefox bug 1895341](https://bugzil.la/1895341)). +- Addition of a `filter` parameter to {{WebExtAPIRef("declarativeNetRequest.getDynamicRules")}} and {{WebExtAPIRef("declarativeNetRequest.getSessionRules")}}, which enables the list of returned rules to be filtered by ID ([Firefox bug 1820870](https://bugzil.la/1820870)). + ### Removals ### Other diff --git a/files/en-us/mozilla/firefox/releases/3.5/index.md b/files/en-us/mozilla/firefox/releases/3.5/index.md index 5c82864ddb27980..d05f2cd1e5a3495 100644 --- a/files/en-us/mozilla/firefox/releases/3.5/index.md +++ b/files/en-us/mozilla/firefox/releases/3.5/index.md @@ -85,7 +85,7 @@ page-type: firefox-release-notes - : Firefox 3.5 supports web workers to allow easy multi-threading support in web applications. - [Using geolocation](/en-US/docs/Web/API/Geolocation_API) - : Firefox 3.5 supports the Geolocation API, which allows web applications to obtain information about the user's current location if a provider for that information is installed and enabled. -- [Locating DOM elements using selectors](/en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors) +- [Locating DOM elements using selectors](/en-US/docs/Web/API/Document_Object_Model/Locating_DOM_elements_using_selectors) - : The selectors API allows querying a document to locate the elements that match a given selection rule. - [Mouse gesture events](https://web.archive.org/web/20210724051233/https://developer.mozilla.org/en-US/docs/Web/Events/Mouse_gesture_events) - : Firefox 3.5 supports mouse gesture events such as trackpad swipes. diff --git a/files/en-us/mozilla/firefox/releases/97/index.md b/files/en-us/mozilla/firefox/releases/97/index.md index 33502c5b9b09952..25cbbcfc0092f8d 100644 --- a/files/en-us/mozilla/firefox/releases/97/index.md +++ b/files/en-us/mozilla/firefox/releases/97/index.md @@ -47,7 +47,7 @@ No notable changes ### APIs -- `AnimationFrameProvider` is now available in a [`DedicatedWorkerGlobalScope`](/en-US/docs/Web/API/DedicatedWorkerGlobalScope). This means the [`requestAnimationFrame`](/en-US/docs/Web/API/window/requestAnimationFrame) and [`cancelAnimationFrame`](/en-US/docs/Web/API/Window/cancelAnimationFrame) methods can be used within a dedicated worker. +- `AnimationFrameProvider` is now available in a [`DedicatedWorkerGlobalScope`](/en-US/docs/Web/API/DedicatedWorkerGlobalScope). This means the [`requestAnimationFrame`](/en-US/docs/Web/API/Window/requestAnimationFrame) and [`cancelAnimationFrame`](/en-US/docs/Web/API/Window/cancelAnimationFrame) methods can be used within a dedicated worker. (See [Firefox bug 1388931](https://bugzil.la/1388931) for more details.) #### DOM diff --git a/files/en-us/web/api/audiolistener/index.md b/files/en-us/web/api/audiolistener/index.md index 30bb387a3a601fb..50499ed9555468c 100644 --- a/files/en-us/web/api/audiolistener/index.md +++ b/files/en-us/web/api/audiolistener/index.md @@ -43,7 +43,7 @@ It is important to note that there is only one listener per context and that it - {{domxref("AudioListener.setPosition()")}} {{deprecated_inline}} - : Sets the position of the listener. -> **Note:** Although these methods are deprecated they are currently the only way to set the orientation and position in Firefox. +> **Note:** Although these methods are deprecated they are currently the only way to set the orientation and position in Firefox (see [Firefox bug 1283029](https://bugzilla.mozilla.org/show_bug.cgi?id=1283029)). ## Deprecated features diff --git a/files/en-us/web/api/audiolistener/positionx/index.md b/files/en-us/web/api/audiolistener/positionx/index.md index 5d04ef4472ffe97..18edb3d2e1f2cb3 100644 --- a/files/en-us/web/api/audiolistener/positionx/index.md +++ b/files/en-us/web/api/audiolistener/positionx/index.md @@ -10,7 +10,7 @@ browser-compat: api.AudioListener.positionX The `positionX` read-only property of the {{ domxref("AudioListener") }} interface is an {{domxref("AudioParam")}} representing the x position of the listener in 3D cartesian space. -> **Note:** The parameter is _a-rate_ when used with a {{domxref("PannerNode")}} whose {{domxref("PannerNode.panningModel", "PannerNode")}} is set to equalpower, or _k-rate_ otherwise. +> **Note:** The parameter is [_a-rate_](/en-US/docs/Web/API/AudioParam#a-rate) when used with a {{domxref("PannerNode")}} whose {{domxref("PannerNode.panningModel", "PannerNode")}} is set to equalpower, or [_k-rate_](/en-US/docs/Web/API/AudioParam#k-rate) otherwise. ## Value diff --git a/files/en-us/web/api/audiolistener/positiony/index.md b/files/en-us/web/api/audiolistener/positiony/index.md index 78922f0a0ad9cee..854a00ac34dd524 100644 --- a/files/en-us/web/api/audiolistener/positiony/index.md +++ b/files/en-us/web/api/audiolistener/positiony/index.md @@ -10,7 +10,7 @@ browser-compat: api.AudioListener.positionY The `positionY` read-only property of the {{ domxref("AudioListener") }} interface is an {{domxref("AudioParam")}} representing the y position of the listener in 3D cartesian space. -> **Note:** The parameter is _a-rate_ when used with a {{domxref("PannerNode")}} whose {{domxref("PannerNode.panningModel", "PannerNode")}} is set to equalpower, or _k-rate_ otherwise. +> **Note:** The parameter is [_a-rate_](/en-US/docs/Web/API/AudioParam#a-rate) when used with a {{domxref("PannerNode")}} whose {{domxref("PannerNode.panningModel", "PannerNode")}} is set to equalpower, or [_k-rate_](/en-US/docs/Web/API/AudioParam#k-rate) otherwise. ## Value diff --git a/files/en-us/web/api/audiolistener/positionz/index.md b/files/en-us/web/api/audiolistener/positionz/index.md index 1bcc2eb4335b945..a7eef9e67766c93 100644 --- a/files/en-us/web/api/audiolistener/positionz/index.md +++ b/files/en-us/web/api/audiolistener/positionz/index.md @@ -10,7 +10,7 @@ browser-compat: api.AudioListener.positionZ The `positionZ` read-only property of the {{ domxref("AudioListener") }} interface is an {{domxref("AudioParam")}} representing the z position of the listener in 3D cartesian space. -> **Note:** The parameter is _a-rate_ when used with a {{domxref("PannerNode")}} whose {{domxref("PannerNode.panningModel", "PannerNode")}} is set to equalpower, or _k-rate_ otherwise. +> **Note:** The parameter is [_a-rate_](/en-US/docs/Web/API/AudioParam#a-rate) when used with a {{domxref("PannerNode")}} whose {{domxref("PannerNode.panningModel", "PannerNode")}} is set to equalpower, or [_k-rate_](/en-US/docs/Web/API/AudioParam#k-rate) otherwise. ## Value diff --git a/files/en-us/web/api/canvas_api/tutorial/drawing_shapes/index.md b/files/en-us/web/api/canvas_api/tutorial/drawing_shapes/index.md index 487ddc1f3627ad9..f71b5637837528b 100644 --- a/files/en-us/web/api/canvas_api/tutorial/drawing_shapes/index.md +++ b/files/en-us/web/api/canvas_api/tutorial/drawing_shapes/index.md @@ -555,7 +555,7 @@ draw(); {{EmbedLiveSample("Shapes_with_holes", "", "160")}} -In the example above, the outer triangle goes clockwise (move to the top-left corner, then draw a line to the right-left corner, and finish at the bottom) and the inner triangle goes anticlockwise (move to the top, then line to the bottom-left corner, and finish at the bottom-right). +In the example above, the outer triangle goes clockwise (move to the top-left corner, then draw a line to the top-right corner, and finish at the bottom) and the inner triangle goes anticlockwise (move to the top, then line to the bottom-left corner, and finish at the bottom-right). ## Path2D objects diff --git a/files/en-us/web/api/css_object_model/managing_screen_orientation/index.md b/files/en-us/web/api/css_object_model/managing_screen_orientation/index.md index 30d506a6410d63e..391d1fea5712dc1 100644 --- a/files/en-us/web/api/css_object_model/managing_screen_orientation/index.md +++ b/files/en-us/web/api/css_object_model/managing_screen_orientation/index.md @@ -143,10 +143,10 @@ The Screen Orientation API is made to prevent or handle such a change. ### Listening to orientation changes -The {{domxref("Window.orientationchange_event", "orientationchange")}} event is triggered each time the device change the orientation of the screen and the orientation itself can be read with the {{domxref("Screen.orientation")}} property. +Each time the orientation of the screen changes, the {{domxref("Window.orientationchange_event", "orientationchange")}} event is triggered: ```js -screen.addEventListener("orientationchange", () => { +screen.orientation.addEventListener("change", () => { console.log(`The orientation of the screen is: ${screen.orientation}`); }); ``` diff --git a/files/en-us/web/api/csskeyframerule/style/index.md b/files/en-us/web/api/csskeyframerule/style/index.md index 2a9f4fd7abbba92..a809edc6733c057 100644 --- a/files/en-us/web/api/csskeyframerule/style/index.md +++ b/files/en-us/web/api/csskeyframerule/style/index.md @@ -1,7 +1,7 @@ --- title: "CSSKeyframeRule: style property" short-title: style -slug: Web/API/CSSkeyframeRule/style +slug: Web/API/CSSKeyframeRule/style page-type: web-api-instance-property browser-compat: api.CSSKeyframeRule.style --- diff --git a/files/en-us/web/api/customevent/customevent/index.md b/files/en-us/web/api/customevent/customevent/index.md index 060ec43eeb1d503..8dfa63bffc0f188 100644 --- a/files/en-us/web/api/customevent/customevent/index.md +++ b/files/en-us/web/api/customevent/customevent/index.md @@ -46,12 +46,14 @@ const dogFound = new CustomEvent("animalfound", { }, }); +const element = document.createElement("div"); // create a
element + // add an appropriate event listener -obj.addEventListener("animalfound", (e) => console.log(e.detail.name)); +element.addEventListener("animalfound", (e) => console.log(e.detail.name)); // dispatch the events -obj.dispatchEvent(catFound); -obj.dispatchEvent(dogFound); +element.dispatchEvent(catFound); +element.dispatchEvent(dogFound); // "cat" and "dog" logged in the console ``` diff --git a/files/en-us/web/api/customevent/detail/index.md b/files/en-us/web/api/customevent/detail/index.md index 34dd1f9daa909a6..ab93e1d34e51ac6 100644 --- a/files/en-us/web/api/customevent/detail/index.md +++ b/files/en-us/web/api/customevent/detail/index.md @@ -8,8 +8,7 @@ browser-compat: api.CustomEvent.detail {{APIRef("DOM")}}{{AvailableInWorkers}} -The read-only **`detail`** property of the {{domxref("CustomEvent")}} interface -returns any data passed when initializing the event. +The read-only **`detail`** property of the {{domxref("CustomEvent")}} interface returns any data passed when initializing the event. ## Value @@ -30,12 +29,14 @@ const dogFound = new CustomEvent("animalfound", { }, }); +const element = document.createElement("div"); // create a
element + // add an appropriate event listener -obj.addEventListener("animalfound", (e) => console.log(e.detail.name)); +element.addEventListener("animalfound", (e) => console.log(e.detail.name)); // dispatch the events -obj.dispatchEvent(catFound); -obj.dispatchEvent(dogFound); +element.dispatchEvent(catFound); +element.dispatchEvent(dogFound); // "cat" and "dog" logged in the console ``` diff --git a/files/en-us/web/api/document/cookie/index.md b/files/en-us/web/api/document/cookie/index.md index 30380e45f9e5881..82c7ea60174b2eb 100644 --- a/files/en-us/web/api/document/cookie/index.md +++ b/files/en-us/web/api/document/cookie/index.md @@ -317,7 +317,7 @@ Read more about [Cookies and Security](https://humanwhocodes.com/blog/2009/05/12 - Keep in mind that the more cookies you have, the more data will be transferred between the server and the client for each request. This will make each request slower. It is highly recommended for you to use [WHATWG DOM Storage](/en-US/docs/Web/API/Web_Storage_API) if you are going to keep "client-only" data. -- [RFC 2965](https://www.ietf.org/rfc/rfc2965.txt) (Section 5.3, "Implementation Limits") specifies that there should be **no maximum length** of a cookie's key or value size, and encourages implementations to support **arbitrarily large cookies**. +- [RFC 2965](https://datatracker.ietf.org/doc/html/rfc2965) (Section 5.3, "Implementation Limits") specifies that there should be **no maximum length** of a cookie's key or value size, and encourages implementations to support **arbitrarily large cookies**. Each browser's implementation maximum will necessarily be different, so consult individual browser documentation. The reason for the [syntax](#syntax) of the `document.cookie` accessor property is due to the client-server nature of cookies, which differs from other client-client storage methods (like, for instance, [localStorage](/en-US/docs/Web/API/Web_Storage_API)): diff --git a/files/en-us/web/api/document/hasstorageaccess/index.md b/files/en-us/web/api/document/hasstorageaccess/index.md index aee20517132304d..2d1dfd5d7b946b2 100644 --- a/files/en-us/web/api/document/hasstorageaccess/index.md +++ b/files/en-us/web/api/document/hasstorageaccess/index.md @@ -12,6 +12,8 @@ The **`hasStorageAccess()`** method of the {{domxref("Document")}} interface ret This method is part of the [Storage Access API](/en-US/docs/Web/API/Storage_Access_API). +> **Note:** This method is another name for {{DOMxRef("Document.hasUnpartitionedCookieAccess()")}}. There are no current plans to remove this method in favor of {{DOMxRef("Document.hasUnpartitionedCookieAccess()")}}. + ## Syntax ```js-nolint @@ -44,9 +46,11 @@ The result returned by this method can be inaccurate in a couple of circumstance document.hasStorageAccess().then((hasAccess) => { if (hasAccess) { // storage access has been granted already. + console.log("cookie access granted"); } else { // storage access hasn't been granted already; // you may want to call requestStorageAccess(). + console.log("cookie access denied"); } }); ``` @@ -63,6 +67,6 @@ document.hasStorageAccess().then((hasAccess) => { ## See also -- {{domxref("Document.requestStorageAccess()")}}, {{domxref("Document.requestStorageAccessFor()")}} +- {{domxref("Document.hasUnpartitionedCookieAccess()")}}, {{domxref("Document.requestStorageAccess()")}}, {{domxref("Document.requestStorageAccessFor()")}} - [Using the Storage Access API](/en-US/docs/Web/API/Storage_Access_API/Using) - [Introducing Storage Access API](https://webkit.org/blog/8124/introducing-storage-access-api/) (WebKit blog) diff --git a/files/en-us/web/api/document/hasunpartitionedcookieaccess/index.md b/files/en-us/web/api/document/hasunpartitionedcookieaccess/index.md new file mode 100644 index 000000000000000..bd23ccdbac704bd --- /dev/null +++ b/files/en-us/web/api/document/hasunpartitionedcookieaccess/index.md @@ -0,0 +1,67 @@ +--- +title: "Document: hasUnpartitionedCookieAccess() method" +short-title: hasUnpartitionedCookieAccess() +slug: Web/API/Document/hasUnpartitionedCookieAccess +page-type: web-api-instance-method +browser-compat: api.Document.hasUnpartitionedCookieAccess +--- + +{{APIRef("Storage Access API")}} + +The **`hasUnpartitionedCookieAccess()`** method of the {{domxref("Document")}} interface returns a {{jsxref("Promise")}} that resolves with a boolean value indicating whether the document has access to [third-party](/en-US/docs/Web/HTTP/Cookies#third-party_cookies), [unpartitioned](/en-US/docs/Web/API/Storage_Access_API#unpartitioned_versus_partitioned_cookies) cookies. + +This method is part of the [Storage Access API](/en-US/docs/Web/API/Storage_Access_API). + +This method is a new name for {{DOMxRef("Document.hasStorageAccess()")}}. + +## Syntax + +```js-nolint +hasUnpartitionedCookieAccess() +``` + +### Parameters + +None. + +### Return value + +A {{jsxref("Promise")}} that resolves with a boolean value indicating whether the document has access to third-party cookies — `true` if it does, and `false` if not. + +See {{DOMxRef("Document.hasStorageAccess()")}} for more details. + +### Exceptions + +- `InvalidStateError` {{domxref("DOMException")}} + - : Thrown if the current {{domxref("Document")}} is not yet active. + +## Examples + +```js +document.hasUnpartitionedCookieAccess().then((hasAccess) => { + if (hasAccess) { + // storage access has been granted already. + console.log("cookie access granted"); + } else { + // storage access hasn't been granted already; + // you may want to call requestStorageAccess(). + console.log("cookie access denied"); + } +}); +``` + +> **Note:** See [Using the Storage Access API](/en-US/docs/Web/API/Storage_Access_API/Using) for a more complete example. + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- {{domxref("Document.hasStorageAccess()")}}, {{domxref("Document.requestStorageAccess()")}}, {{domxref("Document.requestStorageAccessFor()")}} +- [Using the Storage Access API](/en-US/docs/Web/API/Storage_Access_API/Using) +- [Introducing Storage Access API](https://webkit.org/blog/8124/introducing-storage-access-api/) (WebKit blog) diff --git a/files/en-us/web/api/document/index.md b/files/en-us/web/api/document/index.md index 63dadf4833643c9..1a334d06ac8b03e 100644 --- a/files/en-us/web/api/document/index.md +++ b/files/en-us/web/api/document/index.md @@ -7,7 +7,7 @@ browser-compat: api.Document {{APIRef("DOM")}} -The **`Document`** interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the [DOM tree](/en-US/docs/Web/API/Document_object_model/Using_the_Document_Object_Model#what_is_a_dom_tree). +The **`Document`** interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the [DOM tree](/en-US/docs/Web/API/Document_Object_Model/Using_the_Document_Object_Model#what_is_a_dom_tree). The DOM tree includes elements such as {{HTMLElement("body")}} and {{HTMLElement("table")}}, among [many others](/en-US/docs/Web/HTML/Element). It provides functionality globally to the document, like how to obtain the page's URL and create new elements in the document. @@ -240,6 +240,8 @@ _This interface also inherits from the {{DOMxRef("Node")}} and {{DOMxRef("EventT - : Returns a {{DOMxRef('Selection')}} object representing the range of text selected by the user, or the current position of the caret. - {{DOMxRef("Document.hasStorageAccess()")}} - : Returns a {{jsxref("Promise")}} that resolves with a boolean value indicating whether the document has access to unpartitioned cookies. +- {{DOMxRef("Document.hasUnpartitionedCookieAccess()")}} + - : New name for {{DOMxRef("Document.hasStorageAccess()")}}. - {{DOMxRef("Document.importNode()")}} - : Returns a clone of a node from an external document. - {{DOMxRef("Document.mozSetImageElement()")}} {{Non-standard_Inline}} diff --git a/files/en-us/web/api/document/queryselector/index.md b/files/en-us/web/api/document/queryselector/index.md index 40cf3eba6c2499c..1151a28434d1d6a 100644 --- a/files/en-us/web/api/document/queryselector/index.md +++ b/files/en-us/web/api/document/queryselector/index.md @@ -27,7 +27,7 @@ querySelector(selectors) - `selectors` - : A string containing one or more selectors to match. This string must be a valid CSS selector string; if it isn't, a `SyntaxError` exception - is thrown. See [Locating DOM elements using selectors](/en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors) for more about selectors and how to manage them. + is thrown. See [Locating DOM elements using selectors](/en-US/docs/Web/API/Document_Object_Model/Locating_DOM_elements_using_selectors) for more about selectors and how to manage them. > **Note:** Characters that are not part of standard CSS syntax must be > escaped using a backslash character. Since JavaScript also uses backslash escaping, be @@ -126,7 +126,7 @@ not the `main` class. ## See also -- [Locating DOM elements using selectors](/en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors) +- [Locating DOM elements using selectors](/en-US/docs/Web/API/Document_Object_Model/Locating_DOM_elements_using_selectors) - {{domxref("Element.querySelector()")}} - {{domxref("Document.querySelectorAll()")}} - {{domxref("Element.querySelectorAll()")}} diff --git a/files/en-us/web/api/document/queryselectorall/index.md b/files/en-us/web/api/document/queryselectorall/index.md index 0cceb656b5305a2..2939591d5e58885 100644 --- a/files/en-us/web/api/document/queryselectorall/index.md +++ b/files/en-us/web/api/document/queryselectorall/index.md @@ -23,7 +23,7 @@ querySelectorAll(selectors) - `selectors` - : A string containing one or more selectors to match against. This string must be a valid [CSS selector](/en-US/docs/Web/CSS/CSS_selectors) - string; if it's not, a `SyntaxError` exception is thrown. See [Locating DOM elements using selectors](/en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors) for more information about using selectors to + string; if it's not, a `SyntaxError` exception is thrown. See [Locating DOM elements using selectors](/en-US/docs/Web/API/Document_Object_Model/Locating_DOM_elements_using_selectors) for more information about using selectors to identify elements. Multiple selectors may be specified by separating them using commas. @@ -115,7 +115,7 @@ highlightedItems.forEach((userItem) => { ## See also -- [Locating DOM elements using selectors](/en-US/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors) +- [Locating DOM elements using selectors](/en-US/docs/Web/API/Document_Object_Model/Locating_DOM_elements_using_selectors) - [Attribute selectors](/en-US/docs/Web/CSS/Attribute_selectors) in the CSS Guide - [Attribute selectors](/en-US/docs/Learn/CSS/Building_blocks/Selectors/Attribute_selectors) in the MDN Learning Area diff --git a/files/en-us/web/api/document/requeststorageaccess/index.md b/files/en-us/web/api/document/requeststorageaccess/index.md index 1c929c48f8981dc..2cebd3149741de0 100644 --- a/files/en-us/web/api/document/requeststorageaccess/index.md +++ b/files/en-us/web/api/document/requeststorageaccess/index.md @@ -8,7 +8,7 @@ browser-compat: api.Document.requestStorageAccess {{APIRef("Storage Access API")}} -The **`requestStorageAccess()`** method of the {{domxref("Document")}} interface allows content loaded in a third-party context (i.e., embedded in an {{htmlelement("iframe")}}) to request access to [third-party cookies](/en-US/docs/Web/Privacy/Third-party_cookies). This is relevant to user agents that, by default, block access to third-party, [unpartitioned](/en-US/docs/Web/API/Storage_Access_API#unpartitioned_versus_partitioned_cookies) cookies to improve privacy (e.g., to prevent tracking), and is part of the [Storage Access API](/en-US/docs/Web/API/Storage_Access_API). +The **`requestStorageAccess()`** method of the {{domxref("Document")}} interface allows content loaded in a third-party context (i.e., embedded in an {{htmlelement("iframe")}}) to request access to [third-party cookies](/en-US/docs/Web/Privacy/Third-party_cookies) and [unpartitioned state](/en-US/docs/Web/Privacy/State_Partitioning#state_partitioning). This is relevant to user agents that, by default, block access to third-party, [unpartitioned](/en-US/docs/Web/API/Storage_Access_API#unpartitioned_versus_partitioned_cookies) cookies to improve privacy (e.g., to prevent tracking), and is part of the [Storage Access API](/en-US/docs/Web/API/Storage_Access_API). To check whether permission to access third-party cookies has already been granted, you can call {{domxref("Permissions.query()")}}, specifying the feature name `"storage-access"`. @@ -18,15 +18,45 @@ To check whether permission to access third-party cookies has already been grant ```js-nolint requestStorageAccess() +requestStorageAccess(types) ``` ### Parameters -None. +- `types` {{optional_inline}} + + - : An object containing properties that control what unpartitioned state is made accessible. If not specified, the default value of the property is `false`. Available properties are as follows: + + - `all` + - : A boolean specifying all possible unpartitioned states should be made accessible. + - `cookies` + - : A boolean specifying third-party cookies should be made accessible. + - `sessionStorage` + - : A boolean specifying {{domxref("StorageAccessHandle.sessionStorage")}} should be made accessible. + - `localStorage` + - : A boolean specifying {{domxref("StorageAccessHandle.localStorage")}} should be made accessible. + - `indexedDB` + - : A boolean specifying {{domxref("StorageAccessHandle.indexedDB")}} should be made accessible. + - `locks` + - : A boolean specifying {{domxref("StorageAccessHandle.locks")}} should be made accessible. + - `caches` + - : A boolean specifying {{domxref("StorageAccessHandle.caches")}} should be made accessible. + - `getDirectory` + - : A boolean specifying {{domxref("StorageAccessHandle.getDirectory()")}} should be made accessible. + - `estimate` + - : A boolean specifying {{domxref("StorageAccessHandle.estimate()")}} should be made accessible. + - `createObjectURL` + - : A boolean specifying {{domxref("StorageAccessHandle.createObjectURL()")}} should be made accessible. + - `revokeObjectURL` + - : A boolean specifying {{domxref("StorageAccessHandle.revokeObjectURL()")}} should be made accessible. + - `BroadcastChannel` + - : A boolean specifying {{domxref("StorageAccessHandle.BroadcastChannel()")}} should be made accessible. + - `SharedWorker` + - : A boolean specifying {{domxref("StorageAccessHandle.SharedWorker()")}} should be made accessible. ### Return value -A {{jsxref("Promise")}} that fulfills with `undefined` if the access to third-party cookies was granted, and rejects if access was denied. +A {{jsxref("Promise")}} that fulfills with `undefined` if the access to third-party cookies was granted and no `types` parameter was provided, fulfills with {{domxref("StorageAccessHandle")}} if the access to unpartitioned state requested by the `types` parameter was provided, and rejects if access was denied. `requestStorageAccess()` requests are automatically denied unless the embedded content is currently processing a user gesture such as a tap or click ({{Glossary("transient activation")}}), or unless permission was already granted previously. If permission was not previously granted, they need to be run inside a user gesture-based event handler. The user gesture behavior depends on the state of the promise: @@ -36,7 +66,9 @@ A {{jsxref("Promise")}} that fulfills with `undefined` if the access to third-pa ### Exceptions - `InvalidStateError` {{domxref("DOMException")}} - - : Thrown if the current {{domxref("Document")}} is not yet active. + - : Thrown if: + - The current {{domxref("Document")}} is not yet active. + - The `types` parameter is provided and all of its properties are `false`. - `NotAllowedError` {{domxref("DOMException")}} - : Thrown if: - The document's window is not a [secure context](/en-US/docs/Web/Security/Secure_Contexts). @@ -50,10 +82,20 @@ A {{jsxref("Promise")}} that fulfills with `undefined` if the access to third-pa ```js document.requestStorageAccess().then( () => { - console.log("access granted"); + console.log("cookie access granted"); + }, + () => { + console.log("cookie access denied"); + }, +); + +document.requestStorageAccess({ localStorage: true }).then( + (handle) => { + console.log("localStorage access granted"); + handle.localStorage.setItem("foo", "bar"); }, () => { - console.log("access denied"); + console.log("localStorage access denied"); }, ); ``` @@ -70,6 +112,6 @@ document.requestStorageAccess().then( ## See also -- {{domxref("Document.hasStorageAccess()")}}, {{domxref("Document.requestStorageAccessFor()")}} +- {{domxref("Document.hasStorageAccess()")}}, {{domxref("Document.hasUnpartitionedCookieAccess()")}}, {{domxref("Document.requestStorageAccessFor()")}} - [Using the Storage Access API](/en-US/docs/Web/API/Storage_Access_API/Using) - [Introducing Storage Access API](https://webkit.org/blog/8124/introducing-storage-access-api/) (WebKit blog) diff --git a/files/en-us/web/api/document/requeststorageaccessfor/index.md b/files/en-us/web/api/document/requeststorageaccessfor/index.md index ab6e71671db4d4f..f181d66dda38173 100644 --- a/files/en-us/web/api/document/requeststorageaccessfor/index.md +++ b/files/en-us/web/api/document/requeststorageaccessfor/index.md @@ -115,6 +115,6 @@ function checkCookie() { ## See also -- {{domxref("Document.hasStorageAccess()")}}, {{domxref("Document.requestStorageAccess()")}} +- {{domxref("Document.hasStorageAccess()")}}, {{domxref("Document.hasUnpartitionedCookieAccess()")}}, {{domxref("Document.requestStorageAccess()")}} - [Using the Storage Access API](/en-US/docs/Web/API/Storage_Access_API/Using) - [Introducing Storage Access API](https://webkit.org/blog/8124/introducing-storage-access-api/) (WebKit blog) diff --git a/files/en-us/web/api/document_object_model/how_to_create_a_dom_tree/index.md b/files/en-us/web/api/document_object_model/how_to_create_a_dom_tree/index.md index 6dd123c870143d3..2334e6a26b029d4 100644 --- a/files/en-us/web/api/document_object_model/how_to_create_a_dom_tree/index.md +++ b/files/en-us/web/api/document_object_model/how_to_create_a_dom_tree/index.md @@ -1,6 +1,6 @@ --- title: How to create a DOM tree -slug: Web/API/Document_object_model/How_to_create_a_DOM_tree +slug: Web/API/Document_Object_Model/How_to_create_a_DOM_tree page-type: guide --- diff --git a/files/en-us/web/api/document_object_model/locating_dom_elements_using_selectors/index.md b/files/en-us/web/api/document_object_model/locating_dom_elements_using_selectors/index.md index 9d29bb1798d6f6b..0c19b8a7b735cb0 100644 --- a/files/en-us/web/api/document_object_model/locating_dom_elements_using_selectors/index.md +++ b/files/en-us/web/api/document_object_model/locating_dom_elements_using_selectors/index.md @@ -1,6 +1,6 @@ --- title: Locating DOM elements using selectors -slug: Web/API/Document_object_model/Locating_DOM_elements_using_selectors +slug: Web/API/Document_Object_Model/Locating_DOM_elements_using_selectors page-type: guide --- diff --git a/files/en-us/web/api/document_object_model/using_the_document_object_model/example/index.md b/files/en-us/web/api/document_object_model/using_the_document_object_model/example/index.md index 489049d0f8a3bc7..eb90067f68312f5 100644 --- a/files/en-us/web/api/document_object_model/using_the_document_object_model/example/index.md +++ b/files/en-us/web/api/document_object_model/using_the_document_object_model/example/index.md @@ -1,6 +1,6 @@ --- title: Example -slug: Web/API/Document_object_model/Using_the_Document_Object_Model/Example +slug: Web/API/Document_Object_Model/Using_the_Document_Object_Model/Example page-type: guide --- diff --git a/files/en-us/web/api/document_object_model/using_the_document_object_model/index.md b/files/en-us/web/api/document_object_model/using_the_document_object_model/index.md index 42b6141d765edea..4603f87a89ee7bb 100644 --- a/files/en-us/web/api/document_object_model/using_the_document_object_model/index.md +++ b/files/en-us/web/api/document_object_model/using_the_document_object_model/index.md @@ -1,6 +1,6 @@ --- title: Using the Document Object Model -slug: Web/API/Document_object_model/Using_the_Document_Object_Model +slug: Web/API/Document_Object_Model/Using_the_Document_Object_Model page-type: guide --- diff --git a/files/en-us/web/api/element/keydown_event/index.md b/files/en-us/web/api/element/keydown_event/index.md index 31effe2e22af383..e99dbc61e1315f7 100644 --- a/files/en-us/web/api/element/keydown_event/index.md +++ b/files/en-us/web/api/element/keydown_event/index.md @@ -14,7 +14,7 @@ Unlike the deprecated {{domxref("Element/keypress_event", "keypress")}} event, t The `keydown` and [`keyup`](/en-US/docs/Web/API/Element/keyup_event) events provide a code indicating which key is pressed, while `keypress` indicates which character was entered. For example, a lowercase "a" will be reported as 65 by `keydown` and `keyup`, but as 97 by `keypress`. An uppercase "A" is reported as 65 by all events. -Keyboard events are only generated by ``, `