var webUIApp = (Windows && Windows.UI) ? Windows.UI.WebUI.WebUIApplication : null; if (webUIApp) { webUIApp.addEventListener("suspending", _onSuspending); webUIApp.addEventListener("resuming", _onResuming); }
504645
function _eventLogger(element)
    {
        var events = [
            'MSPointerDown',
            'MSPointerUp',
            'MSPointerCancel',
            'MSPointerMove',
            'MSPointerOver',
            'MSPointerOut',
            'MSPointerEnter',
            'MSPointerLeave',
            'MSGotPointerCapture',
            'MSLostPointerCapture',
            'pointerdown',
            'pointerup',
            'pointercancel',
            'pointermove',
            'pointerover',
            'pointerout',
            'pointerenter',
            'pointerleave',
            'gotpointercapture',
            'lostpointercapture',
            'touchstart',
            'touchmove',
            'touchend',
            'touchenter',
            'touchleave',
            'touchcancel',
            'mouseover',
            'mousemove',
            'mouseout',
            'mouseenter',
            'mouseleave',
            'mousedown',
            'mouseup',
            'focus',
            'blur',
            'click',
            'webkitmouseforcewillbegin',
            'webkitmouseforcedown',
            'webkitmouseforceup',
            'webkitmouseforcechanged'
        ];

        function report(e)
        {
            console.log("event logger [" + e.type + "]", e, element);
        }

        for (var i = 0; i < events.length; i++)
            element.addEventListener(events[i], report, false);
    }
649705
def enable_event_listener
      @event_listener ||= lambda do |event|
        self.page = @page ? @page.getEnclosingWindow.getEnclosedPage : event.getNewPage
      end

      listener.add_listener(:web_window_event, &@event_listener)
    end
313187
@Override
	public void eval(String javascript) throws WidgetException {
		WebElement element = findElement(false);
		WebDriver wd = getGUIDriver().getWrappedDriver();
		try {
			((JavascriptExecutor) wd).executeScript(javascript, element);
		} catch (Exception e) {
			long time = System.currentTimeMillis() + 2000;
			boolean success = false;
			while (!success && System.currentTimeMillis() < time) {
				try {
					((JavascriptExecutor) wd).executeScript(javascript, element);
					success = true;
				} catch (Exception e2) {
					try {
						Thread.sleep(500);
					} catch (InterruptedException e1) {
						// Ignore
					}
					e = e2;
				}
			}

			if (!success) {
				throw new RuntimeException(e);
			}
		}
	}
214037
public void visit(final WebAppListener webAppListener) {
		NullArgumentException.validateNotNull(webAppListener,
				"Web app listener");
		try {
			final EventListener listener = RegisterWebAppVisitorHS.newInstance(
					EventListener.class, bundleClassLoader,
					webAppListener.getListenerClass());
			webAppListener.setListener(listener);
			webContainer.registerEventListener(listener, httpContext);
			//CHECKSTYLE:OFF
		} catch (Exception ignore) {
			LOG.error(REGISTRATION_EXCEPTION_SKIPPING, ignore);
		}
		//CHECKSTYLE:ON
	}
409090
@Deprecated
  public Object f(com.google.gwt.user.client.Element e, int i) {
    setElement(e);
    setIndex(i);
    Widget w = GQuery.getAssociatedWidget(e);
    if (w != null) {
      f(w, i);
    } else {
      f(e.<com.google.gwt.dom.client.Element> cast());
    }
    return null;
  }
1236572
private void LaunchWebPage(InteractiveObject interactiveObjectFinal, String url) {
        if (webPagePlusUISceneObject == null) {
            final String urlFinal = url;
            final GVRSceneObject gvrSceneObjectAnchor = interactiveObjectFinal.getSensor().getOwnerObject();
            gvrContext.getActivity().runOnUiThread(new Runnable() {
                @Override
                public void run() {

                    // Launch a new WebView window and place the web page there.
                    gvrWebView = new WebView(gvrContext.getActivity());
                    gvrWebView.setInitialScale(100);
                    gvrWebView.setLayoutParams(new ViewGroup.LayoutParams(1600, 1200));
                    WebSettings webSettings = gvrWebView.getSettings();
                    webSettings.setJavaScriptEnabled(true);


                    if ((urlFinal.endsWith(".xml")) || (urlFinal.endsWith(".rss"))) {
                        if (gvrWebView != null) gvrWebView.loadData(webPageContent, "text/html", null);
                    } // end if rss or xml data
                    else {
                        // Open a Web page
                        gvrWebView.setWebViewClient(new WebViewClient() {
                            //TODO: replace for depricated code with:
                            // onReceivedError (WebView view, WebResourceRequest request, WebResourceError error)
                            public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
                                Log.e(TAG, "   setWebViewClient Error ");
                                Log.e(TAG, "   errorCode " + errorCode + "; description " + description + "; url " + failingUrl);
                            }
                        });
                        if (gvrWebView != null) gvrWebView.loadUrl(urlFinal);
                    }  //  end if url data - a web address

                    if (gvrWebView != null) {

                        GVRViewSceneObject gvrWebViewSceneObject = new GVRViewSceneObject(gvrContext,
                                gvrWebView, webViewDimensions[0], webViewDimensions[1]);
                        gvrWebViewSceneObject.setName("Web View");

                        gvrWebViewSceneObject.getRenderData().getMaterial().setOpacity(1.0f);
                        gvrWebViewSceneObject.getTransform().setPosition(0.0f, 0.0f, 0.0f);
                        gvrWebViewSceneObject.getRenderData().setRenderMask(0);
                        gvrWebViewSceneObject.getRenderData().setRenderMask(
                                GVRRenderData.GVRRenderMaskBit.Left
                                        | GVRRenderData.GVRRenderMaskBit.Right);

                        if (useWebPageTranformControls) WebPageTranformControls( gvrWebViewSceneObject, gvrSceneObjectAnchor, urlFinal);
                        else WebPageCloseOnClick( gvrWebViewSceneObject, gvrSceneObjectAnchor, urlFinal);

                    }
                }  // end run
            });
        }  // end if webPagePlusUISceneObject == null
    }
785779
function() {
            var userAgentWrapper = UserAgent.getUserAgentInfo();
            var runningBrowser = this._getProperties(userAgentWrapper);
            return !(Object.defineProperty == null || runningBrowser.isIE8);
        }
1208291
public int waitForWindowPageChanged(String windowName) {
    if (getScopeServices().getConnection() == null) {
      throw new CommunicationException(
          "waiting for a window failed because Opera is not connected.");
    }

    return getScopeServices().waitForDesktopWindowPageChanged(windowName,
                                                              OperaIntervals.WINDOW_EVENT_TIMEOUT
                                                                  .getMs());
  }
25257
function (e) {

/*Line 162 - 'AtomUI.js' */        var t = e.target;
/*Line 163 - 'AtomUI.js' */        if (t && /input/gi.test(t.nodeName) && /checkbox/gi.test(t.type))
/*Line 164 - 'AtomUI.js' */            return;

/*Line 166 - 'AtomUI.js' */        if (e.preventDefault) { e.preventDefault(); }
/*Line 167 - 'AtomUI.js' */        else { e.stop(); }

/*Line 169 - 'AtomUI.js' */        e.returnValue = false;
/*Line 170 - 'AtomUI.js' */        e.stopPropagation();
/*Line 171 - 'AtomUI.js' */        return false;
/*Line 172 - 'AtomUI.js' */    }
992297
function () {

/*Line 304 - 'AtomApplication.js' */                this.bindEvent(window, "resize", "invokeUpdateUI");

/*Line 306 - 'AtomApplication.js' */                var self = this;
/*Line 307 - 'AtomApplication.js' */                //this._onRefreshValue = function () {
/*Line 308 - 'AtomApplication.js' */                //    self.onRefreshValue.apply(self, arguments);
/*Line 309 - 'AtomApplication.js' */                //};
/*Line 310 - 'AtomApplication.js' */                this._onRefreshValue = aggregateHandler(function () {
/*Line 311 - 'AtomApplication.js' */                    self.onRefreshValue.apply(self, arguments);
/*Line 312 - 'AtomApplication.js' */                });

/*Line 314 - 'AtomApplication.js' */                this._scope._$_watcher = this;

/*Line 316 - 'AtomApplication.js' */                base.init.call(this);


/*Line 319 - 'AtomApplication.js' */                this.closeCommand = function () {
/*Line 320 - 'AtomApplication.js' */                    self.onCloseCommand.apply(self, arguments);
/*Line 321 - 'AtomApplication.js' */                };

/*Line 323 - 'AtomApplication.js' */            }
1160854
function previewOnLoad() {
    pwindow = iframe.contentWindow;
    var p$ = pwindow && pwindow.$;        // preview jquery object
    if (!p$ || p$.editorLoaded) return;   // not ready || already initialized

    var pdoc = pwindow.document;

    // handle pane adjust event over preview
    pdoc.addEventListener('dragover', function(e) {
      adjustPanes(e.clientX, e.clientY, true); // handle over preview
      e.preventDefault();
    });

    // handle pane adjuster drop event over preview
    // (firefox will try to navigate to the url if text is dropped on it)
    pdoc.addEventListener('drop', function(e) {
      e.preventDefault();
    });

    pRef = pwindow.pubRef || {};
    var relPath = pRef.relPath || '';

    $css = p$('<link rel="stylesheet" href="' + relPath + '/pub/css/pub-preview.css">');
    p$('head').append($css);
    $css.get(0).disabled = true;
    toggleFragments();

    var $script = p$('<script src="' + relPath + '/pub/js/pub-preview.js"></script>');
    p$('body').append($script);

    p$.editorLoaded = true;
    clearInterval(previewPoller);
  }
171312
function addUnloadHook () {
  window.onbeforeunload = function (e) {
    var msg = "Are you sure? Any unsaved progress will be lost."
    e = e || window.event;

    // For IE and Firefox prior to version 4
    if (e) {
      e.returnValue = msg;
    }

    // For Safari
    return msg;
  };
}
376519
@Override
    public void doPortletAction(
            IPortletWindowId portletWindowId,
            HttpServletRequest request,
            HttpServletResponse response) {
        final long timeout = getPortletActionTimeout(portletWindowId, request);

        final IPortletExecutionWorker<Long> portletActionExecutionWorker =
                this.portletWorkerFactory.createActionWorker(request, response, portletWindowId);
        portletActionExecutionWorker.submit();

        try {
            portletActionExecutionWorker.get(timeout);
        } catch (Exception e) {
            // put the exception into the error map for the session
            final Map<IPortletWindowId, Exception> portletFailureMap = getPortletErrorMap(request);
            portletFailureMap.put(portletWindowId, e);
        }

        // If the worker is still running add it to the hung-workers queue
        if (!portletActionExecutionWorker.isComplete()) {
            cancelWorker(request, portletActionExecutionWorker);
        }

        // Is this portlet permitted to emit events?  (Or is it disablePortletEvents=true?)
        final IPortletWindow portletWindow =
                portletWindowRegistry.getPortletWindow(request, portletWindowId);
        IPortletDefinition portletDefinition =
                portletWindow.getPortletEntity().getPortletDefinition();
        IPortletDefinitionParameter disablePortletEvents =
                portletDefinition.getParameter(DISABLE_PORTLET_EVENTS_PARAMETER);
        if (disablePortletEvents != null && Boolean.parseBoolean(disablePortletEvents.getValue())) {
            logger.info(
                    "Ignoring portlet events for portlet '{}' because they have been disabled.",
                    portletDefinition.getFName());
        } else {
            // Proceed with events...
            final PortletEventQueue portletEventQueue =
                    this.eventCoordinationService.getPortletEventQueue(request);
            this.doPortletEvents(portletEventQueue, request, response);
        }
    }
477308
@Override
	public void onFinisStepGetCapabilities(String url, String userName, String password) {
		if (checkFullWmsUrl(url)) {
			WmsClient.getInstance().getWmsService().getCapabilities(wmsSelectedLayerInfo.getBaseWmsUrl(),
				wmsSelectedLayerInfo.getWmsVersion(),
				new Callback<WmsGetCapabilitiesInfo, String>() {

					@Override
					public void onFailure(String s) {

					}

					@Override
					public void onSuccess(WmsGetCapabilitiesInfo wmsGetCapabilitiesInfo) {
						controllerButtonsWindow.setWarningLabelText(null, false);
						if (currentStep instanceof GetCapabilitiesView) {
							setWmsLayerInfos(wmsGetCapabilitiesInfo.getLayers());
							goToNextStep();
						}
					}
				});
		} else {
			setWarningLabelText(currentStep.getInvalidMessage(), true);
		}
	}
227767
function bindOnReady(win, callback, eventUtils) {
      var doc = win.document, event = { type: 'ready' };

      if (eventUtils.domLoaded) {
        callback(event);
        return;
      }

      function isDocReady() {
        // Check complete or interactive state if there is a body
        // element on some iframes IE 8 will produce a null body
        return doc.readyState === "complete" || (doc.readyState === "interactive" && doc.body);
      }

      // Gets called when the DOM is ready
      function readyHandler() {
        if (!eventUtils.domLoaded) {
          eventUtils.domLoaded = true;
          callback(event);
        }
      }

      function waitForDomLoaded() {
        if (isDocReady()) {
          removeEvent(doc, "readystatechange", waitForDomLoaded);
          readyHandler();
        }
      }

      function tryScroll() {
        try {
          // If IE is used, use the trick by Diego Perini licensed under MIT by request to the author.
          // http://javascript.nwbox.com/IEContentLoaded/
          doc.documentElement.doScroll("left");
        } catch (ex) {
          Delay.setTimeout(tryScroll);
          return;
        }

        readyHandler();
      }

      // Use W3C method (exclude IE 9,10 - readyState "interactive" became valid only in IE 11)
      if (doc.addEventListener && !(Env.ie && Env.ie < 11)) {
        if (isDocReady()) {
          readyHandler();
        } else {
          addEvent(win, 'DOMContentLoaded', readyHandler);
        }
      } else {
        // Use IE method
        addEvent(doc, "readystatechange", waitForDomLoaded);

        // Wait until we can scroll, when we can the DOM is initialized
        if (doc.documentElement.doScroll && win.self === win.top) {
          tryScroll();
        }
      }

      // Fallback if any of the above methods should fail for some odd reason
      addEvent(win, 'load', readyHandler);
    }
424441
def pause(expected = nil)
      paused = listener.paused?
      states = { paused: true, unpaused: false, toggle: !paused }
      pause = states[expected || :toggle]
      fail ArgumentError, "invalid mode: #{expected.inspect}" if pause.nil?
      return if pause == paused

      listener.public_send(pause ? :pause : :start)
      UI.info "File event handling has been #{pause ? 'paused' : 'resumed'}"
    end
747353
function() {

		Lava.suspendListener(this._widget_property_changed_listener);
		this._scope_changed_listener && Lava.suspendListener(this._scope_changed_listener);
		this._scope.setValue(this._widget.get(this._property_name));
		Lava.resumeListener(this._widget_property_changed_listener);
		this._scope_changed_listener && Lava.resumeListener(this._scope_changed_listener);

	}