From 78291b4caa8c466d5e96480b7c0646f5f255952c Mon Sep 17 00:00:00 2001 From: MDN Web Docs GitHub Bot <108879845+mdn-bot@users.noreply.github.com> Date: Fri, 17 Jul 2026 08:58:29 +0200 Subject: [PATCH 1/3] fix: auto-cleanup by bot (#44756) chore: auto-fix Markdownlint, Prettier, and front-matter issues --- .../en-us/web/css/reference/properties/border-shape/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/css/reference/properties/border-shape/index.md b/files/en-us/web/css/reference/properties/border-shape/index.md index 902a25e37f0a721..87c19f1340abf38 100644 --- a/files/en-us/web/css/reference/properties/border-shape/index.md +++ b/files/en-us/web/css/reference/properties/border-shape/index.md @@ -235,7 +235,7 @@ border-shape: shape( padding: 24px; ``` -This way, the `padding` will be set outside the shape, causing it to get smaller, and forcing the background to fill up the parts of the shape extending outside the content area. You can see this technique in action in our [irregular jigsaw piece navigation menu](/en-US/docs/Web/CSS/Guides/Borders_and_box_decorations/border_shape_nav_menu) example. +This way, the `padding` will be set outside the shape, causing it to get smaller, and forcing the background to fill up the parts of the shape extending outside the content area. You can see this technique in action in our [irregular jigsaw piece navigation menu](/en-US/docs/Web/CSS/Guides/Borders_and_box_decorations/Border_shape_nav_menu) example. ## Formal definition @@ -543,7 +543,7 @@ Hover over or focus the paragraph to see the animation. - {{cssxref("border")}} - {{cssxref("corner-shape")}} -- [Creating an irregular nav menu with border-shape](/en-US/docs/Web/CSS/Guides/Borders_and_box_decorations/border_shape_nav_menu) +- [Creating an irregular nav menu with border-shape](/en-US/docs/Web/CSS/Guides/Borders_and_box_decorations/Border_shape_nav_menu) - [CSS borders and box decorations](/en-US/docs/Web/CSS/Guides/Borders_and_box_decorations) module - [CSS backgrounds and borders](/en-US/docs/Web/CSS/Guides/Backgrounds_and_borders) module - [border-shape: the future of the non-rectangular web](https://una.im/border-shape) by Una Kravets (2026) From 80058a757e45377c0b06e782a9618da65c7ced5a Mon Sep 17 00:00:00 2001 From: Darshan Kachare Date: Fri, 17 Jul 2026 12:35:15 +0530 Subject: [PATCH 2/3] Fix misleading createAttributeNS() namespace guidance and examples (#44727) * docs: clarify createAttributeNS namespace usage * docs: address review feedback --- .../api/document/createattributens/index.md | 57 ++++++++++++++----- 1 file changed, 44 insertions(+), 13 deletions(-) diff --git a/files/en-us/web/api/document/createattributens/index.md b/files/en-us/web/api/document/createattributens/index.md index c4287e1ff9499cc..ee1989f3fc2e824 100644 --- a/files/en-us/web/api/document/createattributens/index.md +++ b/files/en-us/web/api/document/createattributens/index.md @@ -23,13 +23,12 @@ createAttributeNS(namespaceURI, qualifiedName) - `namespaceURI` - : A string that specifies the {{DOMxRef("Attr.namespaceURI", "namespaceURI")}} to associate with the attribute, or the empty string. - Some important namespace URIs are: - - [HTML](/en-US/docs/Web/HTML) - - : `http://www.w3.org/1999/xhtml` - - [SVG](/en-US/docs/Web/SVG) - - : `http://www.w3.org/2000/svg` - - [MathML](/en-US/docs/Web/MathML) - - : `http://www.w3.org/1998/Math/MathML` + In HTML documents, most attributes are in the **null namespace** — use the empty string for these. + Use a specific namespace URI only when creating a namespaced attribute, such as `xml:lang` or `xml:space`. + Some namespace URIs are: + - XML: `http://www.w3.org/XML/1998/namespace` (for `xml:lang`, `xml:space`) + - XMLNS: `http://www.w3.org/2000/xmlns/` (for `xmlns`, `xmlns:*`) + - XLink: `http://www.w3.org/1999/xlink` (for `xlink:href`, `xlink:title`, etc.) - `qualifiedName` - : A string containing the qualified name of the new attribute. The {{DOMxRef("Attr.name", "name")}} property of the created attribute is initialized with this value. @@ -68,14 +67,46 @@ The new {{domxref("Attr")}} node. ## Examples -### Basic usage +### Creating a namespaced attribute + +This example creates an `xml:lang` attribute with the XML namespace and attaches it to a paragraph element. +This attribute specifies the language of the element's content for XML processing. + +```html +

Bonjour!

+``` + +```js +const el = document.getElementById("greeting"); +const attr = document.createAttributeNS( + "http://www.w3.org/XML/1998/namespace", + "xml:lang", +); +attr.value = "fr"; +el.setAttributeNode(attr); +``` + +### Creating an unprefixed attribute + +In HTML documents, unprefixed attributes (such as SVG presentation attributes like `viewBox`) are in the null namespace. +Use the empty string for the `namespaceURI` parameter to match this. + +```html + +``` + +```js +const svg = document.getElementById("svg"); +const attr = document.createAttributeNS("", "viewBox"); +attr.value = "0 0 100 100"; +svg.setAttributeNode(attr); +console.log(svg.getAttribute("viewBox")); // "0 0 100 100" +``` + +Note that, in most cases, you can use {{domxref("Element.setAttribute()")}} instead of `createAttributeNS()` for unprefixed attributes: ```js -const node = document.getElementById("svg"); -const a = document.createAttributeNS("http://www.w3.org/2000/svg", "viewBox"); -a.value = "0 0 100 100"; -node.setAttributeNode(a); -console.log(node.getAttribute("viewBox")); // "0 0 100 100" +svg.setAttribute("viewBox", "0 0 100 100"); ``` ## Specifications From 04c41175b160dc00b1a1b8e4e13b2183d89fdf1a Mon Sep 17 00:00:00 2001 From: Chris Mills Date: Fri, 17 Jul 2026 08:28:36 +0100 Subject: [PATCH 3/3] Editorial review: Document responsive iframe sizing (#44598) * Document responsive iframe sizing * Fixes for kojiishi review comments * Small code tweaks, fix embedded samples * Update files/en-us/web/html/reference/elements/meta/name/responsive-embedded-sizing/index.md Co-authored-by: Hamish Willee * Update files/en-us/web/html/reference/elements/meta/name/responsive-embedded-sizing/index.md Co-authored-by: Hamish Willee * Fixes for hamish review comments * Update files/en-us/web/api/window/requestresize/index.md Co-authored-by: Hamish Willee * content variations --------- Co-authored-by: Hamish Willee --- files/en-us/web/api/window/index.md | 2 + .../web/api/window/requestresize/index.md | 136 ++++++++++++++++++ .../en-us/web/css/guides/box_sizing/index.md | 1 + .../properties/frame-sizing/index.md | 129 +++++++++++++++++ .../html/reference/elements/iframe/index.md | 8 ++ .../reference/elements/meta/name/index.md | 6 +- .../name/responsive-embedded-sizing/index.md | 42 ++++++ 7 files changed, 322 insertions(+), 2 deletions(-) create mode 100644 files/en-us/web/api/window/requestresize/index.md create mode 100644 files/en-us/web/css/reference/properties/frame-sizing/index.md create mode 100644 files/en-us/web/html/reference/elements/meta/name/responsive-embedded-sizing/index.md diff --git a/files/en-us/web/api/window/index.md b/files/en-us/web/api/window/index.md index 8c344b67c89fd5f..4ce66ff7e2200f2 100644 --- a/files/en-us/web/api/window/index.md +++ b/files/en-us/web/api/window/index.md @@ -238,6 +238,8 @@ _This interface inherits methods from the {{domxref("EventTarget")}} interface._ - : Tells the browser that an animation is in progress, requesting that the browser schedule a repaint of the window for the next animation frame. - {{domxref("Window.requestIdleCallback()")}} - : Enables the scheduling of tasks during a browser's idle periods. +- {{domxref("Window.requestResize()")}} + - : Updates the size information shared by an embedded document with its embedding parent, but only if the embedded document has opted in to sharing its size information. - {{domxref("Window.resizeBy()")}} - : Resizes the current window by a certain amount. - {{domxref("Window.resizeTo()")}} diff --git a/files/en-us/web/api/window/requestresize/index.md b/files/en-us/web/api/window/requestresize/index.md new file mode 100644 index 000000000000000..81b48444486fd6a --- /dev/null +++ b/files/en-us/web/api/window/requestresize/index.md @@ -0,0 +1,136 @@ +--- +title: "Window: requestResize() method" +short-title: requestResize() +slug: Web/API/Window/requestResize +page-type: web-api-instance-method +browser-compat: api.Window.requestResize +--- + +{{APIRef}} + +The **`requestResize()`** method of the {{domxref("Window")}} interface updates the size information shared by an embedded document with its embedding parent, but only if the embedded document has opted in to sharing its size information via the [``](/en-US/docs/Web/HTML/Reference/Elements/meta/name/responsive-embedded-sizing) meta tag. + +## Syntax + +```js-nolint +requestResize() +``` + +### Parameters + +None. + +### Return value + +None ({{jsxref("undefined")}}). + +### Exceptions + +- `NotAllowedError` {{domxref("DOMException")}} + - : Thrown if: + - The `requestResize()` method was called from a top-level (non-embedded) document. + - The embedding element is not an {{htmlelement("iframe")}}. + - The embedded document has not opted in to sharing its layout size by including a [``](/en-US/docs/Web/HTML/Reference/Elements/meta/name/responsive-embedded-sizing) tag. + +> [!NOTE] +> If the parent document doesn't set the {{cssxref("frame-sizing")}} CSS property on the embedding ` +``` + +In the `index.html` CSS, we give the ` +``` + +In the `index.html` CSS, we give the `