Bug 883604 - Implement NodeFront.isDocumentElement. r=paul

This commit is contained in:
Dave Camp 2013-06-17 06:52:51 -07:00
parent d738064908
commit d7a7f0ad5c

View File

@ -141,6 +141,11 @@ var NodeActor = protocol.ActorClass({
attrs: this.writeAttrs()
};
if (this.rawNode.ownerDocument &&
this.rawNode.ownerDocument.documentElement === this.rawNode) {
form.isDocumentElement = true;
}
if (this.rawNode.nodeValue) {
// We only include a short version of the value if it's longer than
// gValueSummaryLength
@ -306,6 +311,8 @@ let NodeFront = protocol.FrontClass(NodeActor, {
get shortValue() this._form.shortValue,
get incompleteValue() !!this._form.incompleteValue,
get isDocumentElement() !!this._form.isDocumentElement,
// doctype properties
get name() this._form.name,
get publicId() this._form.publicId,