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

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

Issue 694843003: Specs: default arguments (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 | « sky/specs/apis.md ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Design Principles 1 Design Principles
2 ================= 2 =================
3 3
4 * There should be no objects that represent live state that reflects 4 * There should be no objects that represent live state that reflects
5 some other state, since they are expensive to maintain. e.g. no 5 some other state, since they are expensive to maintain. e.g. no
6 HTMLCollection. 6 HTMLCollection.
7 7
8 * Property getters should be efficient. If an operation is inefficient 8 * Property getters should be efficient. If an operation is inefficient
9 it should be a method instead. e.g. document.getForms(), not 9 it should be a method instead. e.g. document.getForms(), not
10 document.forms. 10 document.forms.
(...skipping 12 matching lines...) Expand all
23 23
24 * APIs that encourage bad practices should not exist. e.g., no 24 * APIs that encourage bad practices should not exist. e.g., no
25 document.write(), innerHTML, insertAdjacentHTML(), etc. 25 document.write(), innerHTML, insertAdjacentHTML(), etc.
26 26
27 * If we expose some aspect of a mojo service (e.g. touch events) we 27 * If we expose some aspect of a mojo service (e.g. touch events) we
28 should expose/wrap all of it (e.g. mousewheel) so that there's no 28 should expose/wrap all of it (e.g. mousewheel) so that there's no
29 cognitive cliff when interacting with that service 29 cognitive cliff when interacting with that service
30 30
31 * APIs should always spell acronyms like words (findId, not findID; 31 * APIs should always spell acronyms like words (findId, not findID;
32 XmlHttpRequest, not XMLHttpRequest) 32 XmlHttpRequest, not XMLHttpRequest)
33
34 * If we extend a method to have new arguments, they must be optional
35 if there's any content using the existing method.
OLDNEW
« no previous file with comments | « sky/specs/apis.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698