trigger("var a=arguments[0];a.parentNode.removeChild(a);", anchor); } else { throw new JavaScriptException(element, "Unable to open tab", 1);
public Object next() { if (!iterator.hasNext()) { // Out of values. Throw StopIteration. throw new JavaScriptException( NativeIterator.getStopIterationObject(scope), null, 0); } return iterator.next(); }
public Object next() { if (!iterator.hasNext()) { // Out of values. Throw StopIteration. throw new JavaScriptException( NativeIterator.getStopIterationObject(scope), null, 0); } return iterator.next(); }
public Object next() { if (!iterator.hasNext()) { // Out of values. Throw StopIteration. throw new JavaScriptException( NativeIterator.getStopIterationObject(scope), null, 0); } return iterator.next(); }
public Object next() { if (!iterator.hasNext()) { // Out of values. Throw StopIteration. throw new JavaScriptException( NativeIterator.getStopIterationObject(scope), null, 0); } return iterator.next(); }
public Object next() { if (!iterator.hasNext()) { // Out of values. Throw StopIteration. throw new JavaScriptException( NativeIterator.getStopIterationObject(scope), null, 0); } return iterator.next(); }
public static void throwStopIteration(Object obj) { throw new JavaScriptException( NativeIterator.getStopIterationObject((Scriptable)obj), "", 0); }
public static void throwStopIteration(Object obj) { throw new JavaScriptException( NativeIterator.getStopIterationObject((Scriptable)obj), "", 0); }
public static void throwStopIteration(Object obj) { throw new JavaScriptException( NativeIterator.getStopIterationObject((Scriptable)obj), "", 0); }
public static void throwStopIteration(Object obj) { throw new JavaScriptException( NativeIterator.getStopIterationObject((Scriptable)obj), "", 0); }
public static void throwStopIteration(Object obj) { throw new JavaScriptException( NativeIterator.getStopIterationObject((Scriptable)obj), "", 0); }
public void put(int index, Scriptable start, Object value) { // FIXME(SW): do indexed properties have a meaning on the global scope? if (this.locked && !has(index, start)) { throw new WrappedException(new JavaScriptException("Global scope locked. Cannot set value for index " + index)); } this.useSession = true; super.put(index, start, value); }
public void put(String name, Scriptable start, Object value) { //Allow setting values to existing variables, or if this is a //java class (used by importClass & importPackage) if (this.locked && !has(name, start) && !(value instanceof NativeJavaClass) && !(value instanceof Function)) { // Need to wrap into a runtime exception as Scriptable.put has no throws clause... throw new WrappedException (new JavaScriptException("Implicit declaration of global variable '" + name + "' forbidden. Please ensure all variables are explicitely declared with the 'var' keyword")); } this.useSession = true; super.put(name, start, value); }
/** * Equivalent to executing "new Error(message, sourceFileName, sourceLineNo)" from JavaScript. * @param cx the current context * @param scope the current scope * @param message the message * @return a JavaScriptException you should throw */ public static JavaScriptException throwError(Context cx, Scriptable scope, String message) { int[] linep = { 0 }; String filename = Context.getSourcePositionFromStack(linep); final Scriptable error = newBuiltinObject(cx, scope, TopLevel.Builtins.Error, new Object[] { message, filename, Integer.valueOf(linep[0]) }); return new JavaScriptException(error, filename, linep[0]); }
private Object next(Context cx, Scriptable scope) { Boolean b = ScriptRuntime.enumNext(this.objectIterator); if (!b.booleanValue()) { // Out of values. Throw StopIteration. throw new JavaScriptException( NativeIterator.getStopIterationObject(scope), null, 0); } return ScriptRuntime.enumId(this.objectIterator, cx); }
private Object next(Context cx, Scriptable scope) { Boolean b = ScriptRuntime.enumNext(this.objectIterator); if (!b.booleanValue()) { // Out of values. Throw StopIteration. throw new JavaScriptException( NativeIterator.getStopIterationObject(scope), null, 0); } return ScriptRuntime.enumId(this.objectIterator, cx); }
private Object next(Context cx, Scriptable scope) { Boolean b = ScriptRuntime.enumNext(this.objectIterator); if (!b.booleanValue()) { // Out of values. Throw StopIteration. throw new JavaScriptException( NativeIterator.getStopIterationObject(scope), null, 0); } return ScriptRuntime.enumId(this.objectIterator, cx); }
private Object next(Context cx, Scriptable scope) { Boolean b = ScriptRuntime.enumNext(this.objectIterator); if (!b.booleanValue()) { // Out of values. Throw StopIteration. throw new JavaScriptException( NativeIterator.getStopIterationObject(scope), null, 0); } return ScriptRuntime.enumId(this.objectIterator, cx); }
private Object next(Context cx, Scriptable scope) { Boolean b = ScriptRuntime.enumNext(this.objectIterator); if (!b.booleanValue()) { // Out of values. Throw StopIteration. throw new JavaScriptException( NativeIterator.getStopIterationObject(scope), null, 0); } return ScriptRuntime.enumId(this.objectIterator, cx); }
public void jsFunction_processPipelineTo(String uri, Object map, Object outputStream) throws Exception { Object out = unwrap(outputStream); if (!(out instanceof OutputStream)) { throw new JavaScriptException("expected a java.io.OutputStream instead of " + out); } getInterpreter().process(getParentScope(), this, uri, map, (OutputStream)out); }