-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rb][BiDi] Add Script module commands and types #12082
base: trunk
Are you sure you want to change the base?
Conversation
I have to add one more test for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's quite a lot of code, any chance we could avoid all the type mapping and just rely on native Ruby types? I understand that not every type exists, but I am not sure when those would be needed as-is? For instance, is there any reason why someone would prefer a returned EvaluateResultException
object instead of raised Ruby exception? The latter allows leveraging regular Ruby being ... rescue .. ned
to handle exceptions, rather than check for the returned object class.
Yeah, this is a lot of strict typing for Ruby. There is no compile time error checking, so there's less need for all the "enums" and type wrappers. Unless it needs to be processed, it's probably better to just return things as Hashes. |
Ok. So I'll try to remove custom-defined classes/objects where possible. I am inclined to go with what is mentioned in w3c spec hence creating those classes. I will push the commit with relevant changes soon. Thank you @titusfortner and @p0deje |
dde1735
to
65d0513
Compare
@p0deje @titusfortner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ruby shouldn't be enforcing types this way. We need a better approach for it
Are we ever merging this? |
Description
Add script module commands and types
Motivation and Context
Implement script module commands and types as described in https://w3c.github.io/webdriver-bidi/#module-script.
The majority of classes and interfaces are mapping the common data types as described in https://w3c.github.io/webdriver-bidi/#data-types.
Types of changes
Checklist