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

Move api.Element.openOrClosedShadowRoot to webext/ #17707

Merged
merged 3 commits into from Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 0 additions & 34 deletions api/Element.json
Expand Up @@ -5733,40 +5733,6 @@
}
}
},
"openOrClosedShadowRoot": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/Element/openOrClosedShadowRoot",
"support": {
"chrome": {
"version_added": false
},
"chrome_android": "mirror",
"edge": "mirror",
"firefox": {
"version_added": "63",
"notes": "Available only to <a href='https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions'>WebExtensions</a>."
},
"firefox_android": "mirror",
"ie": {
"version_added": false
},
"oculus": "mirror",
"opera": "mirror",
"opera_android": "mirror",
"safari": {
"version_added": false
},
"safari_ios": "mirror",
"samsunginternet_android": "mirror",
"webview_android": "mirror"
},
"status": {
"experimental": false,
"standard_track": false,
"deprecated": false
}
}
},
"outerHTML": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/Element/outerHTML",
Expand Down
28 changes: 28 additions & 0 deletions webextensions/api/dom.json
@@ -0,0 +1,28 @@
{
"webextensions": {
"api": {
"dom": {
"openOrClosedShadowRoot": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/dom/openOrClosedShadowRoot",
queengooborg marked this conversation as resolved.
Show resolved Hide resolved
"support": {
"chrome": {
"version_added": false
queengooborg marked this conversation as resolved.
Show resolved Hide resolved
},
"edge": "mirror",
"firefox": {
"version_added": "63"
Copy link
Member

Choose a reason for hiding this comment

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

Firefox does not support the dom API namespace.

But it does support the element.openOrClosedShadowRoot property.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How do you suppose we should handle this? Notes? Alt. names?

Copy link
Member

Choose a reason for hiding this comment

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

Is alternative_name typically used for same API signatures? The difference here is a method vs a getter property.

How about partial_implementation with the note that it's available as element.isOpenOrClosedShadowRoot instead of a method in the extension namespace?

If customary, we could even use alternative_name + partial_implementation + notes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's hard to classify what is partial implementation, since that property refers to "an incomplete implementation of the spec that causes significant browser compatibility issues"...but since web extensions have no spec to refer to...!

However, if this method has a completely different structure between Firefox and Chrome, I'm actually thinking that we should split it into two separate features.

},
"firefox_android": "mirror",
"opera": "mirror",
"safari": {
"version_added": false
},
"safari_ios": "mirror"
}
}
}
}
}
}
}