use a static method to toggle this setting on/off instead.
mainly because it makes it so we don't have to use set! in clj_rhino, since that namespace already defines a function called set! ...
This commit is contained in:
parent
b2fa9f54c5
commit
e0ecb7e62b
|
@ -4,7 +4,12 @@ import org.mozilla.javascript.Context;
|
|||
import org.mozilla.javascript.ContextFactory;
|
||||
|
||||
public class DynamicScopeContextFactory extends ContextFactory {
|
||||
public static boolean useDynamicScope;
|
||||
static boolean useDynamicScope;
|
||||
|
||||
public static boolean toggleDynamicScopeCreation(boolean enable) {
|
||||
useDynamicScope = enable;
|
||||
return useDynamicScope;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean hasFeature(Context cx, int featureIndex) {
|
||||
|
|
Reference in a new issue