This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #11
@legendecas since #11 was reopened, I thought why not create a PR to update the proposal itself. Not sure if this process can be quite as simple as this for a Stage 2 proposal (this is one way to find out I guess)!
Note that this also fixes the backwards-compatibility concern with Firefox.
Previously, this proposal could run into trouble if raw strings are thrown. Say you're using a function like:
Before this change, the proposal would have users do something like:
Which in most environments, would create an Error with
cause: 'bad luck'
. But in Firefox it'd befileName: 'bad luck'
. The suggested usage would now be:Switching to an options bag will allow Firefox to continue to interpret the second parameter as
fileName
if it's a string, and an options bag if it's an object (with acause
property).CC @00ff0000red