mirror of
https://github.com/servo/servo.git
synced 2025-06-08 16:43:28 +00:00
Document the main steps involved in adding a new DOM interface.
This commit is contained in:
parent
83a6b5d770
commit
cbfba27cf2
1 changed files with 14 additions and 0 deletions
|
@ -156,6 +156,20 @@
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
|
//! Adding a new DOM interface
|
||||||
|
//! ==========================
|
||||||
|
//!
|
||||||
|
//! Adding a new interface `Foo` requires at least the following:
|
||||||
|
//!
|
||||||
|
//! * adding the new IDL file at `components/script/dom/webidls/Foo.webidl`;
|
||||||
|
//! * creating `components/script/dom/foo.rs`;
|
||||||
|
//! * listing `foo.rs` in components/script/dom/mod.rs`;
|
||||||
|
//! * defining the DOM struct `Foo` with a `#[dom_struct]` attribute, a
|
||||||
|
//! superclass or `Reflector` member, and other members as appropriate;
|
||||||
|
//! * implementing the
|
||||||
|
//! `dom::bindings::codegen::Bindings::FooBindings::FooMethods` trait for
|
||||||
|
//! `JSRef<Foo>`.
|
||||||
|
//!
|
||||||
//! Accessing DOM objects from layout
|
//! Accessing DOM objects from layout
|
||||||
//! =================================
|
//! =================================
|
||||||
//!
|
//!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue