Skip to content

Commit

Permalink
fix bugs in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
steimelchrome committed Nov 17, 2023
1 parent 390d4bd commit dffd6de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ The document picture-in-picture window supports the resizeTo() and resizeBy()
APIs, but only with a user gesture on the PiP window:

```js
const expandButton = pipDocument.document.createElement('button');
const expandButton = pipWindow.document.createElement('button');
expandButton.textContent = 'Expand PiP Window';
expandButton.addEventListener('click', () => {
// Expand the PiP window's width by 20px and height by 30px.
pipWindow.resizeBy(20, 30);
});
pipWindow.document.append(expandButton);
pipWindow.document.body.append(expandButton);
```

## Detailed design discussion
Expand Down
4 changes: 2 additions & 2 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -554,13 +554,13 @@ The document picture-in-picture window supports the {{Window/resizeTo()}} and
{{Window/resizeBy()}} APIs, but only with a user gesture on the PiP window:

<pre class="lang-javascript">
const expandButton = pipDocument.document.createElement('button');
const expandButton = pipWindow.document.createElement('button');
expandButton.textContent = 'Expand PiP Window';
expandButton.addEventListener('click', () => {
// Expand the PiP window's width by 20px and height by 30px.
pipWindow.resizeBy(20, 30);
});
pipWindow.document.append(expandButton);
pipWindow.document.body.append(expandButton);
</pre>

# Acknowledgments # {#acknowledgments}
Expand Down

0 comments on commit dffd6de

Please sign in to comment.