mirror of
https://github.com/servo/servo.git
synced 2025-09-27 15:20:09 +01:00
script: Support decomposing ShadowRoot from mozjs HandleValue
(#38984)
- Add `ShadowRoot` to `JSValue` to avoid `WebDriverJSError::UnknownType`, and `JavaScriptEvaluationError::SerializationError` when execute JS from embedder. - Add unit test. - Move [is_detached](https://w3c.github.io/webdriver/#dfn-is-detached) to `fn is_detached` to be reused. - Other random simplification. Testing: WebDriver conformance tests. --------- Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
parent
5308228436
commit
3ac226e841
12 changed files with 43 additions and 39 deletions
|
@ -1047,6 +1047,7 @@ pub enum JSValue {
|
|||
Number(f64),
|
||||
String(String),
|
||||
Element(String),
|
||||
ShadowRoot(String),
|
||||
Frame(String),
|
||||
Window(String),
|
||||
Array(Vec<JSValue>),
|
||||
|
|
|
@ -256,6 +256,7 @@ pub enum WebDriverJSError {
|
|||
/// Occurs when handler received an event message for a layout channel that is not
|
||||
/// associated with the current script thread
|
||||
BrowsingContextNotFound,
|
||||
DetachedShadowRoot,
|
||||
JSException(JSValue),
|
||||
JSError,
|
||||
StaleElementReference,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue