All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.rap.rwt.widgets.BrowserUtil Maven / Gradle / Ivy

/*******************************************************************************
 * Copyright (c) 2012, 2016 EclipseSource and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    EclipseSource - initial API and implementation
 ******************************************************************************/
package org.eclipse.rap.rwt.widgets;

import org.eclipse.rap.rwt.internal.util.ParamCheck;
import org.eclipse.swt.browser.Browser;


/**
 * Utility class to work with non-blocking browser script execution.
 *
 * @see Browser
 * @since 2.0
 * @deprecated Use the methods on Browser instead
 */
@Deprecated
public final class BrowserUtil {

  /**
   * Executes the given script in a non-blocking way. The browserCallback is notified
   * when the result from the operation is available.
   * 

* Use this method instead of the execute() or evaluate() methods from * the respective Browser widget when running in JEE_COMPATIBILITY mode. *

* *

* This method will throw an IllegalStateException if called while another script is * still pending to be executed. *

* @param browser the browser to execute the script, must not be null. * @param script the script to execute, must not be null. * @param browserCallback the callback to be notified when the result from the script execution is * available, must not be null. * * @exception IllegalStateException when another script is already being executed. * * @see Browser * @see BrowserCallback * @see org.eclipse.rap.rwt.application.Application.OperationMode * @deprecated Use Browser.evaluate( BrowserCallback ) instead */ @Deprecated public static void evaluate( Browser browser, String script, BrowserCallback browserCallback ) { ParamCheck.notNull( browser, "browser" ); browser.evaluate( script, browserCallback ); } private BrowserUtil() { // prevent instantiation } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy