forked from servo/servo
-
Notifications
You must be signed in to change notification settings - Fork 0
Adding a new WebIDL binding
Josh Matthews edited this page Mar 31, 2014
·
5 revisions
- Add the new webidl file to src/components/script/dom/webidls
- Add an entry to Bindings.conf
- Create your implementation
lowercasename.rs
in src/components/script/dom - you'll need a#[deriving(Encodable)]
struct containing a Reflector at minimum, as well as implementation of theReflectable
trait. Look at blob.rs for a nice, minimal reference. - Add your implementation to script.rs to ensure it is compiled.
- Build, and fix up any compile errors (such as missing methods or incorrect argument types in your new implementation).
There's an example of a simple HTML element addition which deviates a bit from the above steps.