Bug 883604 - Implement NodeFront.isDocumentElement. r=paul

This commit is contained in:
Dave Camp 2013-06-17 06:52:51 -07:00
Родитель d738064908
Коммит d7a7f0ad5c
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

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