Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.render = function(template, model, options) {
options = options || {};
model = model || {};
var self = this;
var out;
var contentHolders = {};
var viewModel = new EjsView(model);
var templateLocals = {
script_tag: function(script) {
return viewModel.start_tag_for("script", { src: "/js/" + script + ".js", type: "text/javascript" }) +
viewModel.tag_end("script");
},
stylesheet_tag: function(stylesheet, htmlOptions) {
var opts = { href: "/css/" + stylesheet + ".css", rel: "stylesheet", media: "screen" };
util.update(opts, htmlOptions);
return viewModel.start_tag_for("link", opts) + viewModel.tag_end("link");
},
content_for: function(namespace, callback) {
if (!(callback instanceof Function))
throw new Error("content_for requires a function as its second argument");
log.debug("content for " + namespace);
this.render = function(template, model, options) {
options = options || {};
model = model || {};
var self = this;
var out;
var contentHolders = {};
var viewModel = new EjsView(model);
var templateLocals = {
script_tag: function(script) {
return viewModel.start_tag_for("script", { src: "/js/" + script + ".js", type: "text/javascript" }) +
viewModel.tag_end("script");
},
stylesheet_tag: function(stylesheet, htmlOptions) {
var opts = { href: "/css/" + stylesheet + ".css", rel: "stylesheet", media: "screen" };
util.update(opts, htmlOptions);
return viewModel.start_tag_for("link", opts) + viewModel.tag_end("link");
},
content_for: function(namespace, callback) {
if (!(callback instanceof Function))
throw new Error("content_for requires a function as its second argument");
print("content for " + namespace);