| OLD | NEW |
| 1 <script> | 1 <script> |
| 2 class DOMAgent { | 2 class DOMAgent { |
| 3 constructor(delegate) { | 3 constructor(delegate) { |
| 4 this.enabled = false; | 4 this.enabled = false; |
| 5 this.delegate_ = delegate; | 5 this.delegate_ = delegate; |
| 6 this.nextNodeId_ = 1; | 6 this.nextNodeId_ = 1; |
| 7 this.nodeToId_ = new Map(); | 7 this.nodeToId_ = new Map(); |
| 8 this.idToNode_ = new Map(); | 8 this.idToNode_ = new Map(); |
| 9 this.observer_ = null; |
| 9 Object.preventExtensions(this); | 10 Object.preventExtensions(this); |
| 10 } | 11 } |
| 11 | 12 |
| 12 getIdForNode_(node) { | 13 getIdForNode_(node) { |
| 13 if (this.nodeToId_.has(node)) | 14 if (this.nodeToId_.has(node)) |
| 14 return this.nodeToId_.get(node); | 15 return this.nodeToId_.get(node); |
| 15 var id = this.nextNodeId_++; | 16 var id = this.nextNodeId_++; |
| 16 this.nodeToId_.set(node, id); | 17 this.nodeToId_.set(node, id); |
| 17 this.idToNode_.set(id, node); | 18 this.idToNode_.set(id, node); |
| 18 return id; | 19 return id; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 node: this.serializeNode_(node), | 164 node: this.serializeNode_(node), |
| 164 }); | 165 }); |
| 165 }.bind(this)); | 166 }.bind(this)); |
| 166 } | 167 } |
| 167 } | 168 } |
| 168 } | 169 } |
| 169 } | 170 } |
| 170 | 171 |
| 171 module.exports = DOMAgent; | 172 module.exports = DOMAgent; |
| 172 </script> | 173 </script> |
| OLD | NEW |