Skip to content

Conversation

@captainbrosset
Copy link
Contributor

document.open and document.close are not discouraged in the spec, but they're only useful for document.write anyway, so we might as well group all of these related methods together in a new discouraged feature.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Feb 12, 2025
@captainbrosset
Copy link
Contributor Author

captainbrosset commented Feb 21, 2025

@ddbeck interestingly, adding the two accepts_TrustedHTML keys makes the feature appear as if it's only supported in chromium. Not that it matters since the whole feature is discouraged, and therefore not baseline. But it makes the compat data here a little weird because document.write() has been supported everywhere for a long time.

For consumers who only care about the baseline status, nothing to worry about.
But for those who show the complete compat data, it might make sense to add compute_from: api.Document.write to make the data more like what people would expect. However, doing so here fails the build because that key is deprecated.

ddbeck added a commit to ddbeck/web-features that referenced this pull request Feb 21, 2025
This was a bug in a somewhat complex set of conditionals.

Helps along web-platform-dx#2643
ddbeck added a commit to ddbeck/web-features that referenced this pull request Feb 21, 2025
This was a bug in a somewhat complex set of conditionals.

This also removes the warnings about deprecated keys, since we allow
them in certain settings.

Helps along web-platform-dx#2643
@ddbeck
Copy link
Collaborator

ddbeck commented Feb 21, 2025

@captainbrosset you found a bug! I sent #2689 to fix it.

Here's what that fix would look like on this branch: document-write...ddbeck:web-features:fix-document-write

ddbeck added a commit that referenced this pull request Feb 21, 2025
This was a bug in a somewhat complex set of conditionals.

This also removes the warnings about deprecated keys, since we allow
them in certain settings.

Helps along #2643
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

Thank you for the review on the other PR, Patrick! I've merged main into this branch and refreshed the dist. All is well now.

@ddbeck ddbeck merged commit 589c8ae into main Feb 21, 2025
3 checks passed
@ddbeck ddbeck deleted the document-write branch February 21, 2025 17:52
@ddbeck ddbeck changed the title document.write() feature Add document.write() feature Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants