Module z_script

Function Index

add_content_script/2
add_script/2
clean/1Remove all scripts from the context, resetting it back to a clean sheet.
get_page_startup_script/1
get_script/1Collect all scripts in the context, returns an iolist with javascript.
javascript_ast/2Render a javascript ast, injects a #context{} with a script into the output stream.
split/1Split the scripts from the context.

Function Details

add_content_script/2

add_content_script(Script, Context) -> any()

add_script/2

add_script(Script, Context) -> any()

clean/1

clean(Context::Context1) -> Context2

Remove all scripts from the context, resetting it back to a clean sheet.

get_page_startup_script/1

get_page_startup_script(Context) -> any()

get_script/1

get_script(Context) -> iolist()

Collect all scripts in the context, returns an iolist with javascript.

javascript_ast/2

javascript_ast(Block::list() | binary(), Context::#context{}) -> #context{}

Render a javascript ast, injects a #context{} with a script into the output stream.

split/1

split(Context) -> any()

Split the scripts from the context. Returns the scripts and a cleaned context.


Generated by EDoc, Jul 10 2014, 12:31:48.