Skip to content

Ff149 allow more chars in attributes/element names#43350

Merged
hamishwillee merged 6 commits intomdn:mainfrom
hamishwillee:ff149_allow_chars_attributes_elements
Mar 23, 2026
Merged

Ff149 allow more chars in attributes/element names#43350
hamishwillee merged 6 commits intomdn:mainfrom
hamishwillee:ff149_allow_chars_attributes_elements

Conversation

@hamishwillee
Copy link
Copy Markdown
Collaborator

@hamishwillee hamishwillee commented Mar 6, 2026

FF149 adds support for additional characters to be used in attribute and element names in https://bugzilla.mozilla.org/show_bug.cgi?id=1773312. Previoulsy the DOM allowed you to only create them with XML characters, now the rules are less restrictive.

This adds docs updates.

  • createAttribute()
  • setAttribute()
  • toggleAttribute()
  • createElement()
  • createElementNS()
  • createDocument()
  • createAttributeNS()
  • setAttributeNS()
  • CustomElementRegistry.whenDefined()
  • CustomElementRegistry.define()

Related docs work can be tracked in #43218

@hamishwillee hamishwillee requested a review from a team as a code owner March 6, 2026 06:05
@hamishwillee hamishwillee requested review from chrisdavidmills and removed request for a team March 6, 2026 06:05
@hamishwillee hamishwillee marked this pull request as draft March 6, 2026 06:05
@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Mar 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 6, 2026

Preview URLs (10 pages)
External URLs (7)

URL: /en-US/docs/Web/API/Document/createAttribute
Title: Document: createAttribute() method


URL: /en-US/docs/Web/API/Document/createAttributeNS
Title: Document: createAttributeNS() method


URL: /en-US/docs/Web/API/Document/createElement
Title: Document: createElement() method


URL: /en-US/docs/Web/API/Document/createElementNS
Title: Document: createElementNS() method


URL: /en-US/docs/Web/API/DOMImplementation/createDocument
Title: DOMImplementation: createDocument() method


URL: /en-US/docs/Web/API/Element/setAttribute
Title: Element: setAttribute() method


URL: /en-US/docs/Web/API/Element/setAttributeNS
Title: Element: setAttributeNS() method

(comment last updated: 2026-03-23 01:51:23)

@hamishwillee hamishwillee force-pushed the ff149_allow_chars_attributes_elements branch from febf052 to f600acb Compare March 10, 2026 02:37
@hamishwillee hamishwillee changed the title Ff149 allow chars attributes elements Ff149 allow more chars in attributes/element names Mar 10, 2026
@hamishwillee hamishwillee force-pushed the ff149_allow_chars_attributes_elements branch from f600acb to 2643011 Compare March 10, 2026 02:51
@hamishwillee hamishwillee marked this pull request as ready for review March 10, 2026 02:51
Includes:
- Document.createAttribute()/createAttributeNS()
- Document.setAttribute()/setAttributeNS()
- Document.createElement()/createElementNS()
- Element.toggleAttribute()
- DOMImplementation.createDocument()
- CustomElementRegistry.whenDefined()/define()
@hamishwillee hamishwillee force-pushed the ff149_allow_chars_attributes_elements branch from 2643011 to 2745030 Compare March 10, 2026 03:59
Copy link
Copy Markdown
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hamishwillee a bunch of suggestions to sift through, but nothing serious. Nice work!

Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
@hamishwillee
Copy link
Copy Markdown
Collaborator Author

Thanks very much @chrisdavidmills - I accepted all your suggestions.

Copy link
Copy Markdown
Contributor

@chrisdavidmills chrisdavidmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have found a broken link, and I also added another suggestion for your consideration, which you can take or leave.

I will approve this now, so you can merge when ready. I don't think I need to see this again.

Cheers, @hamishwillee!

@hamishwillee hamishwillee merged commit ff9dd82 into mdn:main Mar 23, 2026
8 checks passed
@hamishwillee hamishwillee deleted the ff149_allow_chars_attributes_elements branch March 23, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants