Skip to content

Details for runtime.getFrameId#13219

Merged
rebloor merged 3 commits into
mdn:mainfrom
rebloor:details-for-runtime.getFrameId
Mar 20, 2022
Merged

Details for runtime.getFrameId#13219
rebloor merged 3 commits into
mdn:mainfrom
rebloor:details-for-runtime.getFrameId

Conversation

@rebloor
Copy link
Copy Markdown
Contributor

@rebloor rebloor commented Feb 23, 2022

Summary

Add release notes and API reference for runtime.getFrameId.

Related issues

Provide documentation for Bug 1733104 Consider allowing retrieval of frameId from <iframe> elements.

Related compatibility data is provided in Adding details for runtime.getFrameId #15088

Metadata

This PR…

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error
@rebloor rebloor added the Content:WebExt WebExtensions docs label Feb 23, 2022
@rebloor rebloor self-assigned this Feb 23, 2022
@rebloor rebloor requested review from a team as code owners February 23, 2022 02:09
@rebloor rebloor requested review from ddbeck and removed request for a team February 23, 2022 02:09
@github-actions github-actions Bot added the Content:Other Any docs not covered by another "Content:" label label Feb 23, 2022
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 23, 2022

Preview URLs

Flaws

Note! 2 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Mozilla/Firefox/Releases/96
Title: Firefox 96 for developers
on GitHub
Flaw count: 1

  • broken_links:
    • Can't resolve /en-US/docs/Web/CSS/color_value/hwb()

External URLs

URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime
Title: runtime
on GitHub

No new external URLs


URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/getFrameId
Title: runtime.getFrameId()
on GitHub

No new external URLs


URL: /en-US/docs/Mozilla/Firefox/Releases/96
Title: Firefox 96 for developers
on GitHub

No new external URLs

(this comment was updated 2022-03-20 01:34:28.438178)

@rebloor rebloor requested a review from zombie February 23, 2022 02:12
---
{{AddonSidebar}}

Returns the frame ID of any window global or frame element when called from a content script.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This works from extension pages as well (including the background page), but the main use case is indeed to be available from content scripts. Not sure how to word that better.

Copy link
Copy Markdown
Contributor Author

@rebloor rebloor Mar 17, 2022

Choose a reason for hiding this comment

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

@zombie so would this be accurate "Returns the frame ID of any window global or frame element when called from a content script or extension page, including background pages."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sgtm!

{{WebExtExamples}}

## Browser compatibility

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since we don't document Safari Technology Preview in compat data, I suggest we add something like this for now:

This method was proposed through the WebExtensions community group, implemented in Firefox 96 and will be available starting with Safari Technology Preview 142.

Copy link
Copy Markdown
Contributor Author

@rebloor rebloor Mar 17, 2022

Choose a reason for hiding this comment

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

The compatibility data will include the Firefox release version. I'm not sure the information about how this method was proposed is relevant to compatibility. This would leave "Available in Safari Technology Preview 142." Presumably, that information would be superseded once it becomes part of Safari, so I'm reluctant to add on the basis we don't have a mechanism for removing this later.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we can add that note to compat data, that's also fine.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Can you review the browser-compat-data change?

@rebloor rebloor merged commit 0194569 into mdn:main Mar 20, 2022
@rebloor rebloor deleted the details-for-runtime.getFrameId branch March 20, 2022 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Other Any docs not covered by another "Content:" label Content:WebExt WebExtensions docs

2 participants