Hello,
#8041 [1] just landed, and that means you no longer have to import NodeCast and
friends from InheritTypes.
Here are a few code snippets that describe the changes:
NodeCast::from_ref(node)
node.upcast::<Node>()
NodeCast::from_layout_js(node)
node.upcast::<Node>()
NodeCast::from_root(node)
Root::upcast::<Node>(node)
NodeCast::to_ref(node)
node.downcast::<Node>()
NodeCast::to_layout_js(node)
node.downcast::<Node>()
NodeCast::to_root(node)
Root::downcast::<Node>(node)
node.is_htmlelement()
node.is::<HTMLElement>()
T: NodeBase
T: DerivedFrom<Node>
Regards.
[1] https://github.com/servo/servo/pull/8041
_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo