Replies: 1 comment 1 reply
-
How about applying JavaScript's |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently methods whose name ends with "?" return true only if the receiver is true.
Browser's Element.closest method returns null when no matching element is found.
Using this API in ruby.wasm, we get the following.
If meethods whose name ends with "?" return false if the receiver value is nil or false, we get the following.
This would violate the existing ruby.wasm API design policy of not hiding JavaScript information as much as possible.
I think it would be easier for Rubyists to use if only nil and false were false as in Ruby.
What do you think?
If you have a good name, it would be good to create a new method that judges loosely.
Beta Was this translation helpful? Give feedback.
All reactions