w3c / w3c/mathml-core

MathMLElement doesn't reflect attributes for more specific elements

Open
#159 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

level-2
Dominant language
HTML
Stars
56
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Generally in HTML when an element has attributes other than the global attributes it has a more specific interface allowing those attributes to be reflected, for example <link> has HTMLLinkElement, or h1-h6 have HTMLHeadingElement.

Currently MathML core only specifies a single MathMLElement which can only reflect mathml global attributes, despite there existing multiple elements with additional attributes:

  • <mo>
  • <mspace>
  • <mfrac>
  • <mpadded>
  • <munderover>
  • <mtd>

I would propose that those elements should get their own interfaces with the appropriate attribute reflection.

As an example for <mo> this would allow setting el.form = "infix" rather than using .setAttribute.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing MathMLElement interface and the MathML Core definitions for mo, mspace, mfrac, mpadded, munderover, and mtd. Done means the issue's listed elements have appropriately defined interfaces and reflected attributes, including the mo form example.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.