sugar

package
v0.0.0-...-4d5cdd4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCapture

func HandleCapture(scriptletContext *jst.ScriptletContext, prefix string, code string) (bool, error)

Examples:

this.startCapture(CODE);

this.endCapture();

(jst.HandleSugarFunc signature)

func HandleComment

func HandleComment(scriptletContext *jst.ScriptletContext, prefix string, code string) (bool, error)

(jst.HandleSugarFunc signature)

func HandleEmbed

func HandleEmbed(scriptletContext *jst.ScriptletContext, prefix string, code string) (bool, error)

Example:

this.clone().embed(bind(CODE, 'present'), env.context);

(jst.HandleSugarFunc signature)

func HandleExpression

func HandleExpression(scriptletContext *jst.ScriptletContext, prefix string, code string) (bool, error)

Examples:

this.write(CODE);

this.write(util.escapeHtml(CODE));

this.write(this.getVariable(CODE));

this.write(util.escapeHtml(this.getVariable(CODE)));

(jst.HandleSugarFunc signature)

func HandleInsert

func HandleInsert(scriptletContext *jst.ScriptletContext, prefix string, code string) (bool, error)

Example:

const __args0 = [CODE];
if (__args0.length>1) scriptlet.renderFrom(this.writer, __args0[0], __args0[1]);
else env.writeFrom(this.writer, __args0[0]);

(jst.HandleSugarFunc signature)

func HandleRender

func HandleRender(scriptletContext *jst.ScriptletContext, prefix string, code string) (bool, error)

Examples:

this.startRender(CODE, env.context);

this.endRender();

(jst.HandleSugarFunc signature)

func RegisterDefaultSugar

func RegisterDefaultSugar()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL