summaryrefslogtreecommitdiffstats
path: root/third_party/jstemplate/jstemplate.js
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/jstemplate/jstemplate.js')
-rw-r--r--third_party/jstemplate/jstemplate.js19
1 files changed, 6 insertions, 13 deletions
diff --git a/third_party/jstemplate/jstemplate.js b/third_party/jstemplate/jstemplate.js
index 39cbc4df..ac113d4 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,8 +860,10 @@ function jstGetTemplate(name, opt_loadHtmlFn) {
*/
function jstGetTemplateOrDie(name, opt_loadHtmlFn) {
var x = jstGetTemplate(name, opt_loadHtmlFn);
- check(x !== null);
- return /** @type Element */(x);
+ if (x === null) {
+ throw new Error('jstGetTemplate() returned null');
+ }
+ return /** @type {Element} */(x);
}
@@ -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_;
-};