diff --git a/files/en-us/web/api/element/index.md b/files/en-us/web/api/element/index.md index cab0b93e196abe5..cb3f61181190e34 100644 --- a/files/en-us/web/api/element/index.md +++ b/files/en-us/web/api/element/index.md @@ -317,7 +317,7 @@ _`Element` inherits methods from its parents {{DOMxRef("Node")}}, and its own pa - : Sets the value of the attribute with the specified name and namespace, from the current node. - {{DOMxRef("Element.setCapture()")}} {{Non-standard_Inline}} {{Deprecated_Inline}} - : Sets up mouse event capture, redirecting all mouse events to this element. -- {{DOMxRef("Element.setHTML()")}} {{SecureContext_Inline}} {{experimental_inline}} +- {{DOMxRef("Element.setHTML()")}} {{SecureContext_Inline}} - : Parses and [sanitizes](/en-US/docs/Web/API/HTML_Sanitizer_API) a string of HTML into a document fragment, which then replaces the element's original subtree in the DOM. - {{DOMxRef("Element.setHTMLUnsafe()")}} - : Parses a string of HTML into a document fragment, without sanitization, which then replaces the element's original subtree in the DOM. The HTML string may include declarative shadow roots, which would be parsed as template elements if the HTML was set using [`Element.innerHTML`](/en-US/docs/Web/API/Element/innerHTML). diff --git a/files/en-us/web/api/element/sethtml/index.md b/files/en-us/web/api/element/sethtml/index.md index 6abf4caf467ef06..3452e203d6ca5d9 100644 --- a/files/en-us/web/api/element/sethtml/index.md +++ b/files/en-us/web/api/element/sethtml/index.md @@ -3,12 +3,10 @@ title: "Element: setHTML() method" short-title: setHTML() slug: Web/API/Element/setHTML page-type: web-api-instance-method -status: - - experimental browser-compat: api.Element.setHTML --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`setHTML()`** method of the {{domxref("Element")}} interface provides an XSS-safe method to parse and sanitize a string of HTML and insert it into the DOM as a subtree of the element. diff --git a/files/en-us/web/api/html_sanitizer_api/index.md b/files/en-us/web/api/html_sanitizer_api/index.md index 0716b1d4c881ace..50487a65fadf9d5 100644 --- a/files/en-us/web/api/html_sanitizer_api/index.md +++ b/files/en-us/web/api/html_sanitizer_api/index.md @@ -2,12 +2,10 @@ title: HTML Sanitizer API slug: Web/API/HTML_Sanitizer_API page-type: web-api-overview -status: - - experimental browser-compat: api.Sanitizer --- -{{DefaultAPISidebar("HTML Sanitizer API")}}{{SeeCompatTable}} +{{DefaultAPISidebar("HTML Sanitizer API")}} The **HTML Sanitizer API** allows developers to take strings of HTML and filter out unwanted elements, attributes, and other HTML entities when they are inserted into the DOM or a shadow DOM. @@ -219,7 +217,7 @@ They may be useful with the unsafe HTML methods and trusted types, depending on ## Interfaces -- {{domxref('Sanitizer')}} {{experimental_inline}} +- {{domxref('Sanitizer')}} - : A reusable sanitizer configuration object that defines what elements and attributes should be allowed/removed when sanitizing untrusted strings of HTML. This is used in the methods that insert strings of HTML into the DOM or Document. - {{domxref('SanitizerConfig')}} diff --git a/files/en-us/web/api/sanitizer/allowattribute/index.md b/files/en-us/web/api/sanitizer/allowattribute/index.md index e6c303fa0e7f9fd..867fd367a5490e4 100644 --- a/files/en-us/web/api/sanitizer/allowattribute/index.md +++ b/files/en-us/web/api/sanitizer/allowattribute/index.md @@ -3,12 +3,10 @@ title: "Sanitizer: allowAttribute() method" short-title: allowAttribute() slug: Web/API/Sanitizer/allowAttribute page-type: web-api-instance-method -status: - - experimental browser-compat: api.Sanitizer.allowAttribute --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`allowAttribute()`** method of the {{domxref("Sanitizer")}} interface sets an attribute to be allowed on all elements when the sanitizer is used. diff --git a/files/en-us/web/api/sanitizer/allowelement/index.md b/files/en-us/web/api/sanitizer/allowelement/index.md index 4e317163c9e6426..5b8485b6bda48f3 100644 --- a/files/en-us/web/api/sanitizer/allowelement/index.md +++ b/files/en-us/web/api/sanitizer/allowelement/index.md @@ -3,12 +3,10 @@ title: "Sanitizer: allowElement() method" short-title: allowElement() slug: Web/API/Sanitizer/allowElement page-type: web-api-instance-method -status: - - experimental browser-compat: api.Sanitizer.allowElement --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`allowElement()`** method of the {{domxref("Sanitizer")}} interface sets that the specified element is allowed in the output when the sanitizer is used. diff --git a/files/en-us/web/api/sanitizer/get/index.md b/files/en-us/web/api/sanitizer/get/index.md index 3d473042532f170..f20672e4e7fd493 100644 --- a/files/en-us/web/api/sanitizer/get/index.md +++ b/files/en-us/web/api/sanitizer/get/index.md @@ -3,12 +3,10 @@ title: "Sanitizer: get() method" short-title: get() slug: Web/API/Sanitizer/get page-type: web-api-instance-method -status: - - experimental browser-compat: api.Sanitizer.get --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`get()`** method of the {{domxref("Sanitizer")}} interface returns a {{domxref('SanitizerConfig')}} dictionary instance that represents the current `Sanitizer` configuration. diff --git a/files/en-us/web/api/sanitizer/index.md b/files/en-us/web/api/sanitizer/index.md index 89694d61a34daac..64f8cb213c0aafb 100644 --- a/files/en-us/web/api/sanitizer/index.md +++ b/files/en-us/web/api/sanitizer/index.md @@ -2,12 +2,10 @@ title: Sanitizer slug: Web/API/Sanitizer page-type: web-api-interface -status: - - experimental browser-compat: api.Sanitizer --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`Sanitizer`** interface of the [HTML Sanitizer API](/en-US/docs/Web/API/HTML_Sanitizer_API) defines a configuration object that specifies what elements, attributes and comments are allowed or should be removed when inserting strings of HTML into an {{domxref("Element")}} or {{domxref("ShadowRoot")}}, or when parsing an HTML string into a {{domxref("Document")}}. @@ -21,28 +19,28 @@ Note that `Sanitizer` is expected to be more efficient to reuse and modify when ## Constructors -- {{domxref("Sanitizer.Sanitizer", "Sanitizer()")}} {{experimental_inline}} +- {{domxref("Sanitizer.Sanitizer", "Sanitizer()")}} - : Creates and returns a `Sanitizer` object, optionally with custom sanitization behavior defined in a {{domxref('SanitizerConfig')}}. ## Instance methods -- {{domxref('Sanitizer.allowElement()')}} {{experimental_inline}} +- {{domxref('Sanitizer.allowElement()')}} - : Sets an element as allowed by the sanitizer, optionally with an array of attributes that are allowed or disallowed. -- {{domxref('Sanitizer.get()')}} {{experimental_inline}} +- {{domxref('Sanitizer.get()')}} - : Returns the current `Sanitizer` configuration as a {{domxref('SanitizerConfig')}} dictionary instance. -- {{domxref('Sanitizer.removeElement()')}} {{experimental_inline}} +- {{domxref('Sanitizer.removeElement()')}} - : Sets an element to be removed by the sanitizer. -- {{domxref('Sanitizer.removeUnsafe()')}} {{experimental_inline}} +- {{domxref('Sanitizer.removeUnsafe()')}} - : Updates the sanitizer configuration so that it will remove any XSS-unsafe HTML. -- {{domxref('Sanitizer.replaceElementWithChildren()')}} {{experimental_inline}} +- {{domxref('Sanitizer.replaceElementWithChildren()')}} - : Sets an element to be replaced by its child HTML elements. -- {{domxref('Sanitizer.allowAttribute()')}} {{experimental_inline}} +- {{domxref('Sanitizer.allowAttribute()')}} - : Sets an attribute as allowed on any element. -- {{domxref('Sanitizer.removeAttribute()')}} {{experimental_inline}} +- {{domxref('Sanitizer.removeAttribute()')}} - : Sets an attribute to be removed from any element. -- {{domxref('Sanitizer.setComments()')}} {{experimental_inline}} +- {{domxref('Sanitizer.setComments()')}} - : Sets whether comments will be allowed or removed by the sanitizer. -- {{domxref('Sanitizer.setDataAttributes()')}} {{experimental_inline}} +- {{domxref('Sanitizer.setDataAttributes()')}} - : Sets whether data attributes on elements will be allowed or removed by the sanitizer. ## Examples diff --git a/files/en-us/web/api/sanitizer/removeattribute/index.md b/files/en-us/web/api/sanitizer/removeattribute/index.md index 9654632cc989134..f4f838fd7e6c012 100644 --- a/files/en-us/web/api/sanitizer/removeattribute/index.md +++ b/files/en-us/web/api/sanitizer/removeattribute/index.md @@ -3,12 +3,10 @@ title: "Sanitizer: removeAttribute() method" short-title: removeAttribute() slug: Web/API/Sanitizer/removeAttribute page-type: web-api-instance-method -status: - - experimental browser-compat: api.Sanitizer.removeAttribute --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`removeAttribute()`** method of the {{domxref("Sanitizer")}} interface sets an attribute to be removed from all elements when the sanitizer is used. diff --git a/files/en-us/web/api/sanitizer/removeelement/index.md b/files/en-us/web/api/sanitizer/removeelement/index.md index 0d56fbbe089af69..226206993ee3e91 100644 --- a/files/en-us/web/api/sanitizer/removeelement/index.md +++ b/files/en-us/web/api/sanitizer/removeelement/index.md @@ -3,12 +3,10 @@ title: "Sanitizer: removeElement() method" short-title: removeElement() slug: Web/API/Sanitizer/removeElement page-type: web-api-instance-method -status: - - experimental browser-compat: api.Sanitizer.removeElement --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`removeElement()`** method of the {{domxref("Sanitizer")}} interface sets the specified element be removed from the output when the sanitizer is used. diff --git a/files/en-us/web/api/sanitizer/removeunsafe/index.md b/files/en-us/web/api/sanitizer/removeunsafe/index.md index 5b2013da065716b..b1d360a4062c033 100644 --- a/files/en-us/web/api/sanitizer/removeunsafe/index.md +++ b/files/en-us/web/api/sanitizer/removeunsafe/index.md @@ -3,12 +3,10 @@ title: "Sanitizer: removeUnsafe() method" short-title: removeUnsafe() slug: Web/API/Sanitizer/removeUnsafe page-type: web-api-instance-method -status: - - experimental browser-compat: api.Sanitizer.removeUnsafe --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`removeUnsafe()`** method of the {{domxref("Sanitizer")}} interface configures the sanitizer configuration so that it will remove all elements, attributes, and event handler content attributes that are considered XSS-unsafe by the browser. diff --git a/files/en-us/web/api/sanitizer/replaceelementwithchildren/index.md b/files/en-us/web/api/sanitizer/replaceelementwithchildren/index.md index 1e23f71e1a3c4ed..917ac6f3460baf2 100644 --- a/files/en-us/web/api/sanitizer/replaceelementwithchildren/index.md +++ b/files/en-us/web/api/sanitizer/replaceelementwithchildren/index.md @@ -3,12 +3,10 @@ title: "Sanitizer: replaceElementWithChildren() method" short-title: replaceElementWithChildren() slug: Web/API/Sanitizer/replaceElementWithChildren page-type: web-api-instance-method -status: - - experimental browser-compat: api.Sanitizer.replaceElementWithChildren --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`replaceElementWithChildren()`** method of the {{domxref("Sanitizer")}} interface sets an element to be replaced by its child HTML elements when the sanitizer is used. This is primarily used for stripping styles from text. diff --git a/files/en-us/web/api/sanitizer/sanitizer/index.md b/files/en-us/web/api/sanitizer/sanitizer/index.md index e1b491e0b640359..ecb1a45c8344993 100644 --- a/files/en-us/web/api/sanitizer/sanitizer/index.md +++ b/files/en-us/web/api/sanitizer/sanitizer/index.md @@ -3,12 +3,10 @@ title: "Sanitizer: Sanitizer() constructor" short-title: Sanitizer() slug: Web/API/Sanitizer/Sanitizer page-type: web-api-constructor -status: - - experimental browser-compat: api.Sanitizer.Sanitizer --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`Sanitizer()`** constructor creates a new {{domxref("Sanitizer")}} object, which can be used to filter unwanted elements and attributes from HTML or documents before they are inserted/parsed into the DOM. diff --git a/files/en-us/web/api/sanitizer/setcomments/index.md b/files/en-us/web/api/sanitizer/setcomments/index.md index 3891849bfde5d83..fd1f00bd7d50a1f 100644 --- a/files/en-us/web/api/sanitizer/setcomments/index.md +++ b/files/en-us/web/api/sanitizer/setcomments/index.md @@ -3,12 +3,10 @@ title: "Sanitizer: setComments() method" short-title: setComments() slug: Web/API/Sanitizer/setComments page-type: web-api-instance-method -status: - - experimental browser-compat: api.Sanitizer.setComments --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`setComments()`** method of the {{domxref("Sanitizer")}} interface sets whether comments will be allowed or removed by the sanitizer. diff --git a/files/en-us/web/api/sanitizer/setdataattributes/index.md b/files/en-us/web/api/sanitizer/setdataattributes/index.md index 27f3968aa71f1e2..a40307c7e8682a6 100644 --- a/files/en-us/web/api/sanitizer/setdataattributes/index.md +++ b/files/en-us/web/api/sanitizer/setdataattributes/index.md @@ -3,12 +3,10 @@ title: "Sanitizer: setDataAttributes() method" short-title: setDataAttributes() slug: Web/API/Sanitizer/setDataAttributes page-type: web-api-instance-method -status: - - experimental browser-compat: api.Sanitizer.setDataAttributes --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`setDataAttributes()`** method of the {{domxref("Sanitizer")}} interface sets whether all [`data-*` attributes](/en-US/docs/Web/HTML/Reference/Global_attributes/data-*) will be allowed by the sanitizer, or if they must be individually specified. diff --git a/files/en-us/web/api/sanitizerconfig/index.md b/files/en-us/web/api/sanitizerconfig/index.md index 83cb5d8bed92610..4e66e0fc6964433 100644 --- a/files/en-us/web/api/sanitizerconfig/index.md +++ b/files/en-us/web/api/sanitizerconfig/index.md @@ -2,14 +2,12 @@ title: SanitizerConfig slug: Web/API/SanitizerConfig page-type: web-api-interface -status: - - experimental browser-compat: - api.Sanitizer.get - api.Sanitizer.Sanitizer --- -{{APIRef("HTML Sanitizer API")}}{{SeeCompatTable}} +{{APIRef("HTML Sanitizer API")}} The **`SanitizerConfig`** dictionary of the [HTML Sanitizer API](/en-US/docs/Web/API/HTML_Sanitizer_API) specifies what elements, attributes and comments are allowed or should be removed when inserting strings of HTML into an {{domxref("Element")}} or {{domxref("ShadowRoot")}}, or when parsing an HTML string into a {{domxref("Document")}}. diff --git a/files/en-us/web/css/reference/at-rules/@font-face/font-stretch/index.md b/files/en-us/web/css/reference/at-rules/@font-face/font-stretch/index.md index ba75b003a871302..b4c7d1ba83a8a1e 100644 --- a/files/en-us/web/css/reference/at-rules/@font-face/font-stretch/index.md +++ b/files/en-us/web/css/reference/at-rules/@font-face/font-stretch/index.md @@ -2,14 +2,10 @@ title: font-stretch slug: Web/CSS/Reference/At-rules/@font-face/font-stretch page-type: css-at-rule-descriptor -status: - - deprecated browser-compat: css.at-rules.font-face.font-stretch sidebar: cssref --- -{{deprecated_header}} - > [!NOTE] > The `font-stretch` descriptor was renamed to `font-width` in the [CSS Fonts specification](https://drafts.csswg.org/css-fonts/#font-stretch-desc). To preserve compatibility, the specification retains `font-stretch` as an alias for the `font-width` descriptor. diff --git a/files/en-us/web/css/reference/properties/flex-basis/index.md b/files/en-us/web/css/reference/properties/flex-basis/index.md index e6ff5713bc5c264..ac61b3549493bd0 100644 --- a/files/en-us/web/css/reference/properties/flex-basis/index.md +++ b/files/en-us/web/css/reference/properties/flex-basis/index.md @@ -217,22 +217,20 @@ We include two same-structure flex containers, which will be styled similarly ex