Skip to content

Commit

Permalink
fix: use more globalThis
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Jul 13, 2023
1 parent e9df0af commit 610d490
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/src/pages/docs/en/keyboard-shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Example (`keysused` attribute):
Example (`keysUsed` property):

```js
class MyInteractiveElement extends window.HTMLElement {
class MyInteractiveElement extends globalThis.HTMLElement {
get keysUsed() {
return ['Enter', ' '];
}
Expand Down
4 changes: 2 additions & 2 deletions test/unit/media-container.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ describe('<media-container>', () => {
// NOTE: Although MediaContainer isn't designed for independent use, registering it
// here to test behavior independent of <media-controller>
before(async () => {
window.customElements.define('media-container', MediaContainer);
await window.customElements.whenDefined('media-container');
customElements.define('media-container', MediaContainer);
await customElements.whenDefined('media-container');
});

it('calls media callbacks', async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/media-controller.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ describe('state propagation behaviors', () => {
}

const MEDIA_STATE_RECEIVER_WC_NAME = 'media-state-receiver';
window.customElements.define(
customElements.define(
MEDIA_STATE_RECEIVER_WC_NAME,
MediaStateReceiverWC
);
Expand Down

0 comments on commit 610d490

Please sign in to comment.