Skip to content

feat: Add Messenger parent parameter #6142

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

Draft
wants to merge 1 commit into
base: add-messenger-delegation
Choose a base branch
from

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Jul 17, 2025

Explanation

Add the parent constructor parameter to the Messenger class for automatic delegation of all capabilities under that messenger's namespace. This significantly reduces boilerplate, making the messenger easier to use in a similar manner to how the old RestrictedMessenger class wored.

See this ADR PR for details: MetaMask/decisions#53

References

Depends upon #6132
Relates to #5626

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@Gudahtt Gudahtt force-pushed the add-messenger-parent-param branch 2 times, most recently from c07ba89 to 4ff719e Compare July 17, 2025 16:30
Add the `parent` constructor parameter to the `Messenger` class for
automatic delegation of all capabilities under that messenger's
namespace. This significantly reduces boilerplate, making the messenger
easier to use in a similar manner to how the old `RestrictedMessenger`
class wored.

See this ADR PR for details: MetaMask/decisions#53
@Gudahtt Gudahtt force-pushed the add-messenger-parent-param branch from 4ff719e to f3e18ba Compare July 17, 2025 16:31
@Gudahtt Gudahtt changed the title feat: Add Messenger parant parameter feat: Add Messenger parent parameter Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant