Skip to content

Commit

Permalink
docs: fix a typo for trade-off (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
wtlin1228 authored Aug 2, 2023
1 parent 5bf0915 commit 17932eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/trade-offs.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ While most third-party scripts add the correct [Cross-Origin Resource Sharing (C

Events handled by third-party scripts that call `event.preventDefault()` will have no effect. Partytown is able to be blocking when the code is ran within the web worker, but not in the other direction.

For example, when a user clicks a link on the main thread, a third-party script may have an event handler on that same link, which may have [event.preventDefault()](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault). By the time the web worker receives and event that the link was clicked, it is no longer a synchronous operation and calling `preventDefault()` has no effect. As a side note, you could also see this as a feature when third-party scripts are abusing `scroll` events without using passive event listeners.
For example, when a user clicks a link on the main thread, a third-party script may have an event handler on that same link, which may have [event.preventDefault()](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault). By the time the web worker receives an event that the link was clicked, it is no longer a synchronous operation and calling `preventDefault()` has no effect. As a side note, you could also see this as a feature when third-party scripts are abusing `scroll` events without using passive event listeners.

## Cross-Origin IFrame Cookies And Storage

Expand Down

1 comment on commit 17932eb

@vercel
Copy link

@vercel vercel bot commented on 17932eb Aug 2, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.