mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibWeb: Move ExceptionOr from DOM/ to WebIDL/
This is a concept fully defined in the Web IDL spec and doesn't belong in the DOM directory/namespace - not even DOMException, despite the name :^)
This commit is contained in:
parent
c0eda77928
commit
ad04d7ac9b
107 changed files with 441 additions and 440 deletions
|
@ -39,7 +39,7 @@ JS::NonnullGCPtr<SubtleCrypto> Crypto::subtle() const
|
|||
}
|
||||
|
||||
// https://w3c.github.io/webcrypto/#dfn-Crypto-method-getRandomValues
|
||||
DOM::ExceptionOr<JS::Value> Crypto::get_random_values(JS::Value array) const
|
||||
WebIDL::ExceptionOr<JS::Value> Crypto::get_random_values(JS::Value array) const
|
||||
{
|
||||
// 1. If array is not an Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, BigInt64Array, or BigUint64Array, then throw a TypeMismatchError and terminate the algorithm.
|
||||
if (!array.is_object() || !(is<JS::Int8Array>(array.as_object()) || is<JS::Uint8Array>(array.as_object()) || is<JS::Uint8ClampedArray>(array.as_object()) || is<JS::Int16Array>(array.as_object()) || is<JS::Uint16Array>(array.as_object()) || is<JS::Int32Array>(array.as_object()) || is<JS::Uint32Array>(array.as_object()) || is<JS::BigInt64Array>(array.as_object()) || is<JS::BigUint64Array>(array.as_object())))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue