Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTreat 'undefined' passed to an optional argument as "missing" #8813
Comments
|
/cc @Ms2ger |
|
The spec is perfectly clear; the interface is It's possible the spec needs to be changed to reflect reality. |
|
@eefriedman is incorrect. Passing |
|
Potentially related to #6558 |
|
Oops, I was looking at the wrong version of the WebIDL specification. Sorry about that. |
|
Consider this example:
In Firefox, Chrome, and Safari, this redirects to http://meow.com/undefined. According to the spec, should |
|
Nevermind. I missed the part about "optional" argument. I think that clears things up for me. |
Treat undefined arguments in JS as missing @frewsxcv please don't hurt me for this. I've added an AND condition to check whether the value being passed is undefined while checking whehther the argument exists at all. Essentially, this is now treating undefined arguments the same as missing arguments. Fixes #8813. Fixes #6558.
Treat 'undefined' passed to optional JS arguments as missing @frewsxcv please don't hurt me for this. I've added an AND condition to check whether the value being passed is undefined while checking whether the argument exists at all. Essentially, this is now treating undefined arguments the same as missing arguments. Fixes #8813. Fixes #6558. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8854) <!-- Reviewable:end -->
…nt, r=<try> Treat 'undefined' passed to an optional argument as "missing" Fixes #8813 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8849) <!-- Reviewable:end -->
Treat 'undefined' passed to optional JS arguments as missing @frewsxcv please don't hurt me for this. I've added an AND condition to check whether the value being passed is undefined while checking whether the argument exists at all. Essentially, this is now treating undefined arguments the same as missing arguments. Fixes #8813. Fixes #6558. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8854) <!-- Reviewable:end -->
Treat 'undefined' passed to optional JS arguments as missing @frewsxcv please don't hurt me for this. I've added an AND condition to check whether the value being passed is undefined while checking whether the argument exists at all. Essentially, this is now treating undefined arguments the same as missing arguments. Fixes #8813. Fixes #6558. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8854) <!-- Reviewable:end -->
Treat 'undefined' passed to optional JS arguments as missing @frewsxcv please don't hurt me for this. I've added an AND condition to check whether the value being passed is undefined while checking whether the argument exists at all. Essentially, this is now treating undefined arguments the same as missing arguments. Fixes #8813. Fixes #6558. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8854) <!-- Reviewable:end -->
Treat 'undefined' passed to optional JS arguments as missing @frewsxcv please don't hurt me for this. I've added an AND condition to check whether the value being passed is undefined while checking whether the argument exists at all. Essentially, this is now treating undefined arguments the same as missing arguments. Fixes #8813. Fixes #6558. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8854) <!-- Reviewable:end -->
Treat 'undefined' passed to optional JS arguments as missing @frewsxcv please don't hurt me for this. I've added an AND condition to check whether the value being passed is undefined while checking whether the argument exists at all. Essentially, this is now treating undefined arguments the same as missing arguments. Fixes #8813. Fixes #6558. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8854) <!-- Reviewable:end -->
Treat 'undefined' passed to optional JS arguments as missing @frewsxcv please don't hurt me for this. I've added an AND condition to check whether the value being passed is undefined while checking whether the argument exists at all. Essentially, this is now treating undefined arguments the same as missing arguments. Fixes #8813. Fixes #6558. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8854) <!-- Reviewable:end -->
Treat 'undefined' passed to optional JS arguments as missing @frewsxcv please don't hurt me for this. I've added an AND condition to check whether the value being passed is undefined while checking whether the argument exists at all. Essentially, this is now treating undefined arguments the same as missing arguments. Fixes #8813. Fixes #6558. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8854) <!-- Reviewable:end -->
Servo:
Firefox:
Chrome:
Is this a spec issue?