Confirmed users
920
edits
LesOrchard (talk | contribs) No edit summary |
LesOrchard (talk | contribs) No edit summary |
||
Line 104: | Line 104: | ||
</pre> | </pre> | ||
Long-form templates become [https://github.com/visionmedia/ejs embedded JS templates], | Long-form templates become [https://github.com/visionmedia/ejs embedded JS templates], something like this:<pre> | ||
something like this:<pre> | |||
<% | <% | ||
/* accepts as input one required parameter: HTML element to create a xref to */ | /* accepts as input one required parameter: HTML element to create a xref to */ | ||
Line 137: | Line 136: | ||
} else { /* the page doesn't exist */ | } else { /* the page doesn't exist */ | ||
var targeturi = "https://developer.mozilla.org/Article_not_found?uri=" .. dest; | var targeturi = "https://developer.mozilla.org/Article_not_found?uri=" .. dest; | ||
%> <code><a rel="internal" href="<%= targeturi %>" class="new"><%- web.text('<' | %> <code><a rel="internal" href="<%= targeturi %>" class="new"><%- web.text('<' + name + '>') %></a></code> <% | ||
} | } | ||
%> | %> | ||
</pre> | </pre> | ||
The above presupposes an API similar to what's exposed to DekiScript, is | |||
non-functional, and mainly serves as a thought experiment in comparative | |||
syntax. | |||
=== Sandboxed JavaScript execution === | === Sandboxed JavaScript execution === |