Constructor
new CspExpressionEvaluator(options)
Parameters:
| Name | Type | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Oracle® JavaScript Extension Toolkit (JET)
8.0.0
F18189-01
See JET Module Loading for an overview of module usage within JET.
define(['ojs/ojcspexpressionevaluator'], function(CspExpressionEvaluator) {
// Application should call API on CspExpressionEvaluator
})//This class is exported directly as module. To import it
import CspExpressionEvaluator= require("ojs/ojcspexpressionevaluator");
A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.
Classes in JET are generally final and do not support subclassing. At the moment, final is not enforced. However, this will likely change in an upcoming JET release.
The default JET expression evaluator cannot be used when Content Security Policy prohibits unsafe evaluations. In order to replace the default evaluator with the JET CSP-compliant evaluator, create and pass an instance of CspExpressionEvaluator class to the Config.setExpressionEvaluator() method. This method must be called before applying knockout bindings in the application for the first time.
Any extra context required for evaluating expressions can be passed to the object constructor using globalScope property.
Config.setExpressionEvaluator(new CspExpressionEvaluator());
[[value]].[[router.stateId]].[['abc']].[[getColor('customer', id)]].[[-100]].[[value + '.png']].[[a && b]] or [[a || b]].[[test ? consequent : alternate]].[a, b, c].[[{'selection_state': selected}]].[[function(){return 'abc'}]].'new Object()'The following code is not supported in expressions:
'var a=b;''if (...){}''x++' or 'x--''='| Name | Type | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|