-
Notifications
You must be signed in to change notification settings - Fork 557
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert createWindow parameters to options bag and add testid option (#…
…2765) This PR refactors the `createWindow` function to use an options bag for its parameters, improving clarity and extensibility. Additionally, it introduces a new `testId` option, allowing customization of the `data-testid` attribute for the generated iframe. We need this change in the [MetaMask/ocap-kernel ](https://github.com/MetaMask/ocap-kernel/) package ([see issue](MetaMask/ocap-kernel#91)), where the `createWindow` function is used, to set a different testId that doesn't conflict with the snaps iframe. This will ensure clear differentiation when using iframes across different packages. Updated and expanded the test suite to cover the presence and absence of sandbox and testId attributes.
- Loading branch information
Showing
5 changed files
with
73 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters