Java Code Examples for org.mozilla.javascript.Context#FEATURE_STRICT_VARS

The following examples show how to use org.mozilla.javascript.Context#FEATURE_STRICT_VARS . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SrgsContextFactory.java    From JVoiceXML with GNU Lesser General Public License v2.1 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected boolean hasFeature(final Context cx, final int featureIndex) {
    switch (featureIndex) {
    case Context.FEATURE_STRICT_MODE:
        return true;
    case Context.FEATURE_STRICT_VARS:
        return true;
    case Context.FEATURE_STRICT_EVAL:
        return true;
    case Context.FEATURE_WARNING_AS_ERROR:
        return true;
    default:
        return super.hasFeature(cx, featureIndex);
    }
}
 
Example 2
Source File: JVoiceXmlContextFactory.java    From JVoiceXML with GNU Lesser General Public License v2.1 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected boolean hasFeature(final Context cx, final int featureIndex) {
    switch (featureIndex) {
    case Context.FEATURE_STRICT_MODE:
        return true;
    case Context.FEATURE_STRICT_VARS:
        return true;
    case Context.FEATURE_STRICT_EVAL:
        return true;
    case Context.FEATURE_WARNING_AS_ERROR:
        return true;
    default:
        return super.hasFeature(cx, featureIndex);
    }
}
 
Example 3
Source File: AppRunnerInterpreter.java    From PHONK with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected boolean hasFeature(Context cx, int featureIndex) {

    switch (featureIndex) {
        case Context.FEATURE_STRICT_EVAL:
            return true;

        case Context.FEATURE_STRICT_VARS:
            return true;
    }

    return super.hasFeature(cx, featureIndex);
}
 
Example 4
Source File: StrictModeApiTest.java    From rhino-android with Apache License 2.0 5 votes vote down vote up
@Override
protected boolean hasFeature(Context cx, int featureIndex) {
    switch (featureIndex) {
        case Context.FEATURE_STRICT_MODE:
        case Context.FEATURE_STRICT_VARS:
        case Context.FEATURE_STRICT_EVAL:
        case Context.FEATURE_WARNING_AS_ERROR:
            return true;
    }
    return super.hasFeature(cx, featureIndex);
}
 
Example 5
Source File: StrictModeApiTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected boolean hasFeature(Context cx, int featureIndex) {
    switch (featureIndex) {
        case Context.FEATURE_STRICT_MODE:
        case Context.FEATURE_STRICT_VARS:
        case Context.FEATURE_STRICT_EVAL:
        case Context.FEATURE_WARNING_AS_ERROR:
            return true;
    }
    return super.hasFeature(cx, featureIndex);
}