Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove spec_url from api.Document.execCommand #24909

Merged
merged 3 commits into from
Dec 5, 2024
Merged

Conversation

SamB
Copy link
Contributor

@SamB SamB commented Nov 2, 2024

The only mentions of execCommand I saw in Trusted Types were in the names of tests.

According to https://respec.org/xref/?term=execCommand%28%29, this API is defined in just one spec, so use that one.

The only mentions of execCommand I saw in Trusted Types were in the names of tests.

According to <https://respec.org/xref/?term=execCommand%28%29>, this API is defined in just one spec, so use that one.
@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Nov 2, 2024
@SamB
Copy link
Contributor Author

SamB commented Nov 2, 2024

It is true that the spec doesn't exactly have good standing, but it is the only one we appear to have, and the api is implemented ~everywhere.

@queengooborg
Copy link
Contributor

It looks like the spec URL you had tried to use is an unofficial draft, which Webref does not consider as a valid standard. Upon further research, it appears that the feature was originally defined in the First Public Working Draft of the trusted types spec, but was then removed in the following Working Draft.

As such, I think that it's actually better to mark this as non-standard and remove the spec URL.

@SamB
Copy link
Contributor Author

SamB commented Nov 2, 2024

Note that html appears to make quite a few normative references to execCommand. The Editing APIs section, in particular, appears to incorporate by reference all of the following:

{
  "https://w3c.github.io/editing/docs/execCommand/": {
    "anchors": [
      "execcommand%28%29",
      "querycommandenabled%28%29",
      "querycommandindeterm%28%29",
      "querycommandstate%28%29",
      "querycommandsupported%28%29",
      "querycommandvalue%28%29",
      "editable",
      "active-range",
      "editing-host-of",
      "delete-the-selection"
    ]
  }
}

(that's every anchor it references from execComman, as listed at https://github.com/w3c/webref/blob/48fcf5576be961ce5bc6cd2a134301b572c5952d/ed/links/html.json#L2807) as well as some user interface requirements. (It also apparently attempts to include a definition of text selection, which presumably should now refer to https://w3c.github.io/selection-api/#dfn-selection instead.)

Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

I don't think we should link to a normative reference that doesn't specify the feature, and since there is no official spec for this (deprecated) feature, the right thing to do here is to remove the spec_url:

api/Document.json Outdated Show resolved Hide resolved
@github-actions github-actions bot added the size:xs [PR only] 0-6 LoC changed label Nov 22, 2024
@caugner
Copy link
Contributor

caugner commented Dec 4, 2024

@Elchi3 While waiting for the spec state change, should we either keep the (broken) spec link as is (i.e. close this PR), or remove the spec_url? I would prefer to not keep this PR hanging around.

@Elchi3
Copy link
Member

Elchi3 commented Dec 5, 2024

I think I would remove the spec_url for now. Hopefully the Web Editing Working Group will publish an active spec for this at some point and then we can add it here.

@caugner caugner changed the title Fix spec_url for api.Document.execCommand Remove spec_url from api.Document.execCommand Dec 5, 2024
@caugner caugner enabled auto-merge (squash) December 5, 2024 14:05
@caugner caugner merged commit 9282545 into mdn:main Dec 5, 2024
9 checks passed
@jpc-ae
Copy link

jpc-ae commented Dec 10, 2024

w3c lists the spec url as https://w3c.github.io/editing/docs/execCommand/

Considering the ubiquitousness of this command, could the spec_url not be updated to point there rather than removing it completely? I get that it's an "unofficial draft", but until it starts being taking out of browsers, I don't see a reason not to include it.

@caugner
Copy link
Contributor

caugner commented Dec 10, 2024

@jpc-ae See the discussion above. As per our guidelines, we don't link to "unofficial" specs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:xs [PR only] 0-6 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants