Exemple #1
0
static int configureWebTypes(Ejs *ejs)
{
    int         slotNum;

    if ((slotNum = ejsLookupProperty(ejs, ejs->global, N("ejs.web", "escapeHtml"))) != 0) {
        ejsBindFunction(ejs, ejs->global, slotNum, web_escapeHtml);
    }
    ejsConfigureHttpServerType(ejs);
    ejsConfigureRequestType(ejs);
    ejsConfigureSessionType(ejs);
    return 0;
}
Exemple #2
0
PUBLIC void ejsConfigureJSONType(Ejs *ejs)
{
    ejsFinalizeScriptType(ejs, N("ejs", "JSON"), sizeof(EjsPot), ejsManagePot, EJS_TYPE_POT);
    ejsBindFunction(ejs, ejs->global, ES_deserialize, g_deserialize);
    ejsBindFunction(ejs, ejs->global, ES_serialize, g_serialize);
}