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

Unified Diff: dart/site/try/src/user_option.dart

Issue 350443006: Add secret option "live" which compiles more frequently. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add comment Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/site/try/src/settings.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/site/try/src/user_option.dart
diff --git a/dart/site/try/src/user_option.dart b/dart/site/try/src/user_option.dart
index ce802a46cbb3f96d1b4c814018b38176fa928038..25c0f0f41446a8b5db5020d318ba9046d5c88647 100644
--- a/dart/site/try/src/user_option.dart
+++ b/dart/site/try/src/user_option.dart
@@ -4,6 +4,23 @@
library trydart.userOption;
+/// Persistent user-configurable option.
+///
+/// Options included in [options] in settings.dart will automatically be
+/// included in the settings UI unless [isHidden] is true.
+///
+/// The value of an option is persisted in [storage] which is normally the
+/// browser's "localStorage", and [name] is a key in "localStorage". This
+/// means that hidden options can be controlled by opening the JavaScript
+/// console and evaluate:
+///
+/// localStorage['name'] = value // or
+/// localStorage.name = value
+///
+/// An option can be reset to the default value using:
+///
+/// delete localStorage['name'] // or
+/// delete localStorage.name
class UserOption {
final String name;
« no previous file with comments | « dart/site/try/src/settings.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698