Move more bindings code to script_bindings (#35578)

* Move JSContext wrapper to script_bindings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Move webidl constant bindings to script_bindings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Move CanGc to script_bindings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Move Dom<T> and Root<T> types to script_bindings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Formatting.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Extra docs for new traits.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Fix clippy warnings.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-02-21 23:46:56 -05:00 committed by GitHub
parent 54286229ea
commit 35f21e426b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 788 additions and 641 deletions

View file

@ -40,7 +40,7 @@ use crate::dom::bindings::codegen::UnionTypes::{
};
use crate::dom::bindings::error::{ErrorResult, Fallible};
use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, Reflector};
use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom};
use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, ToLayout};
use crate::dom::bindings::str::DOMString;
use crate::dom::globalscope::GlobalScope;
use crate::dom::htmlcanvaselement::LayoutCanvasRenderingContextHelpers;