/user/nix/acre/mjtcom rename
author:
contributor:
published:
updated:
source uri:
Summary
// compile a mjt template found using path_info
// return the source as text/javascript
acre.load...
// return the source as text/javascript
acre.load...
Content
// compile a mjt template found using path_info
// return the source as text/javascript
acre.load_module('mjt');
var id = acre.environ.path_info;
if (id.length < 2) {
throw Exception('must include an id in path_info')
}
var cb = 'callback' in acre.environ.params ? acre.environ.params.callback : null;
var url = acre.environ.freebase_service_url + '/api/trans/raw' + id;
var pkg = mjt.acre.compile_url(url);
acre.start_response(200, {'content-type': 'text/javascript; charset="utf-8"'});
if (cb)
acre.write(cb + '((function(){');
acre.write(pkg.toJS());
if (cb)
acre.write('})())');
// return the source as text/javascript
acre.load_module('mjt');
var id = acre.environ.path_info;
if (id.length < 2) {
throw Exception('must include an id in path_info')
}
var cb = 'callback' in acre.environ.params ? acre.environ.params.callback : null;
var url = acre.environ.freebase_service_url + '/api/trans/raw' + id;
var pkg = mjt.acre.compile_url(url);
acre.start_response(200, {'content-type': 'text/javascript; charset="utf-8"'});
if (cb)
acre.write(cb + '((function(){');
acre.write(pkg.toJS());
if (cb)
acre.write('})())');
Created by:
nix
Apr 2, 2008
Last edited by:
Constant Gardener Process
Aug 18, 2009
Recent Discussions about None
There is no discussion about this document.
Start the Discussion »