Chromium Code Reviews| Index: ui/webui/resources/js/load_time_data.js |
| diff --git a/ui/webui/resources/js/load_time_data.js b/ui/webui/resources/js/load_time_data.js |
| index d7f99e161a251e3df8eabe38cc7f9f63cadf6d16..8af272c14152445bb8144412045153a9eccbff3c 100644 |
| --- a/ui/webui/resources/js/load_time_data.js |
| +++ b/ui/webui/resources/js/load_time_data.js |
| @@ -23,6 +23,11 @@ function LoadTimeData() {} |
| LoadTimeData.prototype = { |
| /** |
| * Sets the backing object. |
| + * |
| + * Note that there is no getter for |data_| to discourage abuse of the form: |
| + * |
| + * var value = loadTimeData.data()['key']; |
| + * |
| * @param {Object} value The de-serialized page data. |
| */ |
| set data(value) { |
| @@ -31,6 +36,13 @@ function LoadTimeData() {} |
| }, |
| /** |
| + * Returns a JsEvalContext for |data_|. |
|
Dan Beam
2014/09/23 05:30:39
@returns {JsEvalContext}
Evan Stade
2014/09/23 17:35:07
Done.
|
| + */ |
| + getJsEvalContext: function() { |
|
Dan Beam
2014/09/23 05:30:39
nit: createJsEvalContext
Evan Stade
2014/09/23 17:35:07
Done.
|
| + return new JsEvalContext(this.data_); |
| + }, |
| + |
| + /** |
| * @param {string} id An ID of a value that might exist. |
| * @return {boolean} True if |id| is a key in the dictionary. |
| */ |