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

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

Issue 951673003: Remove outdated examples and framework pieces (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months 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/framework/inspector/console-agent.sky ('k') | sky/framework/inspector/debug.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <script>
2 class CSS {
3 constructor(domAgent) {
4 this.domAgent_ = domAgent;
5 Object.preventExtensions(this);
6 }
7
8 enable() {
9 }
10
11 getInlineStylesForNode(params) {
12 return {
13 "inlineStyle": {
14 "cssProperties": [],
15 "shorthandEntries": [],
16 "styleSheetId": "0",
17 "range": {
18 "startLine": 0,
19 "startColumn": 0,
20 "endLine": 0,
21 "endColumn": 0
22 },
23 "cssText": "",
24 }
25 };
26 }
27
28 getComputedStyleForNode(params) {
29 var node = this.domAgent_.getNodeForId(params.nodeId);
30 if (!node){
31 console.log("Error, missing node" + params.nodeId);
32 return { "computedStyle": [] };
33 }
34 var style = window.getComputedStyle(node, null);
35 if (!style){
36 console.log("Error, no computed style for " + params.nodeId + " " + node);
37 return { "computedStyle": [] };
38 }
39 var computedStyles = [];
40 for (var i = 0; i < style.length; i++) {
41 var name = style.item(i);
42 computedStyles.push({
43 "name": name,
44 "value": style.getPropertyValue(name),
45 });
46 }
47 return {
48 "computedStyle": computedStyles,
49 };
50 }
51 }
52
53 module.exports = CSS;
54 </script>
OLDNEW
« no previous file with comments | « sky/framework/inspector/console-agent.sky ('k') | sky/framework/inspector/debug.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698