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

Side by Side Diff: sky/specs/apis.md

Issue 696783003: fix the complexity comments for attribute APIs (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 | « no previous file | sky/specs/parsing.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 APIs 1 APIs
2 ==== 2 ====
3 3
4 The Sky core API 4 The Sky core API
5 ---------------- 5 ----------------
6 6
7 ```javascript 7 ```javascript
8 module 'sky:core' { 8 module 'sky:core' {
9 9
10 // EVENTS 10 // EVENTS
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 class Attr { 84 class Attr {
85 constructor (String name, String value = ''); // O(1) 85 constructor (String name, String value = ''); // O(1)
86 readonly attribute String name; // O(1) 86 readonly attribute String name; // O(1)
87 readonly attribute String value; // O(1) 87 readonly attribute String value; // O(1)
88 } 88 }
89 89
90 abstract class Element : ParentNode { 90 abstract class Element : ParentNode {
91 readonly attribute String tagName; // O(1) 91 readonly attribute String tagName; // O(1)
92 92
93 Boolean hasAttribute(String name); // O(N) in arguments 93 Boolean hasAttribute(String name); // O(N) in number of attributes
94 String getAttribute(String name); // O(N) in arguments 94 String getAttribute(String name); // O(N) in number of attributes
95 void setAttribute(String name, String value = ''); // O(N) in arguments 95 void setAttribute(String name, String value = ''); // O(N) in number of attr ibutes
96 void removeAttribute(String name); // O(N) in arguments 96 void removeAttribute(String name); // O(N) in number of attributes
97 97
98 // Returns a new Array and new Attr instances every time. 98 // Returns a new Array and new Attr instances every time.
99 Array<Attr> getAttributes(); // O(N) in arguments 99 Array<Attr> getAttributes(); // O(N) in number of attributes
100 100
101 readonly attribute ShadowRoot? shadowRoot; // O(1) // returns the shadow roo t 101 readonly attribute ShadowRoot? shadowRoot; // O(1) // returns the shadow roo t
102 Array<ContentElement> getDestinationInsertionPoints(); // O(N) in number of insertion points the node is in 102 Array<ContentElement> getDestinationInsertionPoints(); // O(N) in number of insertion points the node is in
103 103
104 virtual void attributeChangeCallback(String name, String? oldValue, String? newValue); // noop 104 virtual void attributeChangeCallback(String name, String? oldValue, String? newValue); // noop
105 // TODO(ianh): does a node ever need to know when it's been redistributed? 105 // TODO(ianh): does a node ever need to know when it's been redistributed?
106 } 106 }
107 107
108 class Text : Node { 108 class Text : Node {
109 constructor (String value = ''); // O(1) 109 constructor (String value = ''); // O(1)
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 the core mojo fabric JS API sky:mojo:fabric:core 426 the core mojo fabric JS API sky:mojo:fabric:core
427 the asyncWait/cancelWait mojo fabric JS API (interface to IPC thread) sky:moj o:fabric:ipc 427 the asyncWait/cancelWait mojo fabric JS API (interface to IPC thread) sky:moj o:fabric:ipc
428 the mojom for the shell, proxying through C++ so that the shell pipe isn't exp osed sky:mojo:shell 428 the mojom for the shell, proxying through C++ so that the shell pipe isn't exp osed sky:mojo:shell
429 the sky API sky:core 429 the sky API sky:core
430 the sky debug symbols for private APIs sky:debug 430 the sky debug symbols for private APIs sky:debug
431 ``` 431 ```
432 432
433 TODO(ianh): determine if we want to separate the "this" from the 433 TODO(ianh): determine if we want to separate the "this" from the
434 Document, especially for Modules, so that exposing a module's element 434 Document, especially for Modules, so that exposing a module's element
435 doesn't expose the module's exports attribute. 435 doesn't expose the module's exports attribute.
OLDNEW
« no previous file with comments | « no previous file | sky/specs/parsing.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698