You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require"./lib/hamlet"
{Observable, Compiler} = Hamlet
# {applyStylesheet, CSON} = require "./lib/util"# applyStylesheet require "./style/demo"# TODO: Textarea for template, text area for data, live interactive demo# Changing data reloads the new data into the same template# Changing template reloads the same data into the new templateInteractive.register"demo", ({source, runtimeElement}) ->code="var template, model;"+CoffeeScript.compile(source, bare:true)
code+="\nreturn [template, model];"
[template, model] =Function("Observable", code)(Observable)
view=Function("return "+Compiler.compile(template, compiler: CoffeeScript, runtime:"Hamlet", exports:false))()
runtimeElement.empty().appendview(model)