Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: sky/framework/inspector/dom-agent.sky

Issue 697773002: Remove Element#attributes. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix template binding. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/web/WebElement.cpp ('k') | sky/framework/sky-element/TemplateBinding.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script> 1 <script>
2 function DOMAgent(delegate) { 2 function DOMAgent(delegate) {
3 this.enabled = false; 3 this.enabled = false;
4 this.delegate_ = delegate; 4 this.delegate_ = delegate;
5 this.nextNodeId_ = 1; 5 this.nextNodeId_ = 1;
6 this.nodeToId_ = new Map(); 6 this.nodeToId_ = new Map();
7 this.idToNode_ = new Map(); 7 this.idToNode_ = new Map();
8 } 8 }
9 9
10 DOMAgent.prototype.getIdForNode_ = function(node) { 10 DOMAgent.prototype.getIdForNode_ = function(node) {
(...skipping 14 matching lines...) Expand all
25 for (var child = node.firstChild; child; child = child.nextSibling) { 25 for (var child = node.firstChild; child; child = child.nextSibling) {
26 var record = this.serializeNode_(child); 26 var record = this.serializeNode_(child);
27 if (record) 27 if (record)
28 children.push(record); 28 children.push(record);
29 } 29 }
30 return children; 30 return children;
31 }; 31 };
32 32
33 DOMAgent.prototype.serializeAttributes_ = function(element) { 33 DOMAgent.prototype.serializeAttributes_ = function(element) {
34 var attributes = []; 34 var attributes = [];
35 var attrs = element.attributes; 35 var attrs = element.getAttributes();
36 for (var i = 0; i < attrs.length; ++i) { 36 for (var i = 0; i < attrs.length; ++i) {
37 var attr = attrs[i]; 37 var attr = attrs[i];
38 attributes.push(attr.name); 38 attributes.push(attr.name);
39 attributes.push(attr.value); 39 attributes.push(attr.value);
40 } 40 }
41 return attributes; 41 return attributes;
42 }; 42 };
43 43
44 DOMAgent.prototype.serializeNode_ = function(node) { 44 DOMAgent.prototype.serializeNode_ = function(node) {
45 var id = this.getIdForNode_(node); 45 var id = this.getIdForNode_(node);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 previousNodeId: previousNodeId, 160 previousNodeId: previousNodeId,
161 node: this.serializeNode_(node), 161 node: this.serializeNode_(node),
162 }); 162 });
163 }.bind(this)); 163 }.bind(this));
164 } 164 }
165 } 165 }
166 }; 166 };
167 167
168 module.exports = DOMAgent; 168 module.exports = DOMAgent;
169 </script> 169 </script>
OLDNEW
« no previous file with comments | « sky/engine/web/WebElement.cpp ('k') | sky/framework/sky-element/TemplateBinding.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698