Enable real DOM inspector support.

This commit is contained in:
Josh Matthews 2014-09-04 12:23:48 -04:00
parent e9c4aa534d
commit fa57fe890b
8 changed files with 265 additions and 94 deletions

View file

@ -37,9 +37,39 @@ pub enum EvaluateJSReply {
ActorValue(String),
}
pub struct AttrInfo {
pub namespace: String,
pub name: String,
pub value: String,
}
pub struct NodeInfo {
pub uniqueId: String,
pub baseURI: String,
pub parent: String,
pub nodeType: uint,
pub namespaceURI: String,
pub nodeName: String,
pub numChildren: uint,
pub name: String,
pub publicId: String,
pub systemId: String,
pub attrs: Vec<AttrInfo>,
pub isDocumentElement: bool,
pub shortValue: String,
pub incompleteValue: bool,
}
/// Messages to process in a particular script task, as instructed by a devtools client.
pub enum DevtoolScriptControlMsg {
EvaluateJS(PipelineId, String, Sender<EvaluateJSReply>),
GetRootNode(PipelineId, Sender<NodeInfo>),
GetDocumentElement(PipelineId, Sender<NodeInfo>),
GetChildren(PipelineId, String, Sender<Vec<NodeInfo>>),
}
/// Messages to instruct devtools server to update its state relating to a particular