This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
This is the template source for the page containing a "select". In doT | |
templates the data object is by convention called "it" (though it can | |
be set to be anything). In this example, I'm inventing a field called | |
"choice", whose value would presumably have come from the server via | |
JSON (or whatever) as the property "choice" of the "it" parameter. | |
In the option elements you'll see the doT construct to fetch a value | |
from the "it" object, and you'll see that it involves what looks like |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.beforeConstruction = function(newFunc) { | |
var oldObj = this; | |
var rv = function() { | |
newFunc.apply(this, arguments); | |
oldObj.apply(this, arguments); | |
}; | |
rv.prototype = oldObj.prototype; | |
return rv; | |
}; |