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

Unified Diff: third_party/jstemplate/jstemplate.js

Issue 603693002: Compile third_party/jstemplate with Closure Compiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: two other fixes Created 6 years, 3 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 | « third_party/jstemplate/jsevalcontext.js ('k') | third_party/jstemplate/util.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/jstemplate/jstemplate.js
diff --git a/third_party/jstemplate/jstemplate.js b/third_party/jstemplate/jstemplate.js
index 39cbc4dffc4fdb2fa94c293e9948e3d09e904696..977b77e98c5c51c73cc6d2b771f34c6aaa9c6537 100644
--- a/third_party/jstemplate/jstemplate.js
+++ b/third_party/jstemplate/jstemplate.js
@@ -823,7 +823,7 @@ JstProcessor.prototype.jstAttributes_ = function(template) {
* returning the template.
*
* @param {string} name The ID of the HTML element used as template.
- * @param {Function} opt_loadHtmlFn A function which, when called, will return
+ * @param {Function=} opt_loadHtmlFn A function which, when called, will return
* HTML that contains an element whose ID is 'name'.
*
* @return {Element|null} The DOM node of the template. (Only element nodes
@@ -860,7 +860,9 @@ function jstGetTemplate(name, opt_loadHtmlFn) {
*/
function jstGetTemplateOrDie(name, opt_loadHtmlFn) {
var x = jstGetTemplate(name, opt_loadHtmlFn);
- check(x !== null);
+ if (x === null) {
+ throw new Error('jstGetTemplate() returned null');
+ }
return /** @type Element */(x);
Dan Beam 2014/09/26 02:23:09 shouldn't this be @type {Element} ?
Vitaly Pavlenko 2014/09/26 18:31:39 It works anyways, but that's a good nit. Done.
}
@@ -873,7 +875,7 @@ function jstGetTemplateOrDie(name, opt_loadHtmlFn) {
* @param {string} name
* @param {Function} loadHtmlFn A function that returns HTML to be inserted
* into the DOM.
- * @param {string} opt_target The id of a DOM object under which to attach the
+ * @param {string=} opt_target The id of a DOM object under which to attach the
* HTML once it's inserted. An object with this id is created if it does not
* exist.
* @return {Element} The node whose id is 'name'
@@ -956,12 +958,3 @@ function jstSetInstance(template, values, index) {
JstProcessor.prototype.logState_ = function(
caller, template, jstAttributeValues) {
};
-
-
-/**
- * Retrieve the processing logs.
- * @return {Array.<string>} The processing logs.
- */
-JstProcessor.prototype.getLogs = function() {
- return this.logs_;
-};
« no previous file with comments | « third_party/jstemplate/jsevalcontext.js ('k') | third_party/jstemplate/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698