cx.evaluateString(top, script, "script", 0, null);
return null;
}
};
final ContextFactory contextFactory = new ContextFactory() {
@Override
protected boolean hasFeature(final Context cx, final int featureIndex) {
if (Context.FEATURE_STRICT_MODE == featureIndex) {
return !acceptWriteReadOnly;
}
return super.hasFeature(cx, featureIndex);
}
};
contextFactory.call(action);
}