Generate bindings for Node, CharacterData, Text, Element, and HTMLElement. Hook up text nodes to use the new bindings.

This commit is contained in:
Josh Matthews 2013-07-28 11:43:24 -04:00
parent c9bc2046f6
commit fd4efad70c
20 changed files with 1069 additions and 62 deletions

View file

@ -616,7 +616,7 @@ pub extern fn ThrowingConstructor(_cx: *JSContext, _argc: uint, _vp: *JSVal) ->
}
pub fn initialize_global(global: *JSObject) {
let protoArray = @mut ([0 as *JSObject, ..25]); //XXXjdm PrototyepList::id::_ID_Count
let protoArray = @mut ([0 as *JSObject, ..30]); //XXXjdm PrototyepList::id::_ID_Count
unsafe {
//XXXjdm we should be storing the box pointer instead of the inner
let box = squirrel_away(protoArray);
@ -835,7 +835,7 @@ impl DerivedWrapper for AbstractNode<ScriptView> {
unsafe { *vp = RUST_OBJECT_TO_JSVAL(wrapper) };
return 1;
}
unsafe { *vp = RUST_OBJECT_TO_JSVAL(node::create(cx, self).ptr) };
unsafe { *vp = RUST_OBJECT_TO_JSVAL(node::create(cx, self)) };
return 1;
}