auto merge of #4875 : Ms2ger/servo/new-dom-doc, r=jdm

This commit is contained in:
bors-servo 2015-02-09 11:57:50 -07:00
commit 1af8170037

View file

@ -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
//! =================================
//!