Returns the iframes window object.

@method getWin
@return {Window} Iframe DOM window object.
193599
function () {
        var self = this, elm;

        if (!self.contentWindow) {
          elm = self.iframeElement;

          if (elm) {
            self.contentWindow = elm.contentWindow;
          }
        }

        return self.contentWindow;
      }
447467
function getScrollbarWidth() {
      var outer = $document[0].createElement('div');
      outer.style.visibility = 'hidden';
      outer.style.width = '100px';
      outer.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps

      $document[0].body.appendChild(outer);

      var widthNoScroll = outer.offsetWidth;
      // force scrollbars
      outer.style.overflow = 'scroll';

      // add innerdiv
      var inner = $document[0].createElement('div');
      inner.style.width = '100%';
      outer.appendChild(inner);

      var widthWithScroll = inner.offsetWidth;

      // remove divs
      outer.parentNode.removeChild(outer);

      return widthNoScroll - widthWithScroll;
    }
1234724
function() {
        var draw = OpenLayers.Tile.Image.prototype.shouldDraw.call(this);
        if(draw) {

            // this.url isn't set to the currect value yet, so we call getURL
            // on the layer and store the result in a local variable
            var url = this.layer.getURL(this.bounds);

            var usedIFrame = this.useIFrame;
            this.useIFrame = this.maxGetUrlLength !== null &&
                             !this.layer.async &&
                             url.length > this.maxGetUrlLength;

            var fromIFrame = usedIFrame && !this.useIFrame;
            var toIFrame = !usedIFrame && this.useIFrame;

            if(fromIFrame || toIFrame) {

                // Switching between GET (image) and POST (iframe).

                // We remove the imgDiv (really either an image or an iframe)
                // from the frame and set it to null to make sure initImage
                // will call getImage.

                if(this.imgDiv && this.imgDiv.parentNode === this.frame) {
                    this.frame.removeChild(this.imgDiv);
                }
                this.imgDiv = null;

                // And if we had an iframe we also remove the event pane.

                if(fromIFrame) {
                    this.frame.removeChild(this.frame.firstChild);
                }
            }
        }
        return OpenLayers.Tile.Image.prototype.draw.apply(this, arguments);
    }
186765
function () {
            var cfg = this._cfg, showLabel = (!cfg.hideLabel && !!cfg.label), idx;
            if (showLabel) {
                idx = ((cfg.labelPos === "right" && !this._fullWidth) || cfg.labelPos === "bottom") ? 0 : 1;
            } else {
                idx = 0;
            }
            var dom = this.getDom();
            if (this._isIE7OrLess) {
                dom = dom ? dom.firstChild : null;
            }
            return ariaUtilsDom.getDomElementChild(dom, idx);
        }
1271999
function browser (winOptions) {
    winOptions = assign({ graceful: true }, winOptions)

    // Handle `browser-window` being passed as `parent`.
    if (winOptions.parent && winOptions.parent._native) {
      winOptions.parent = winOptions.parent._native
    }

    if (winOptions.graceful) winOptions.show = false

    // Create `BrowserWindow` backend.
    const window = new BrowserWindow(winOptions)

    if (winOptions.graceful) window.on('ready-to-show', function () { window.show() })

    // Method for loading urls or data.
    function load (source, options, callback = noop) {
      if (typeof options === 'function') callback = options, options = {}
      options = assign({type: null, encoding: 'base64'}, options)

      // Callback handler
      var contents = window.webContents
      eventcb(contents, 'did-finish-load', 'did-fail-load', callback)

      // Load source as data:
      if (options.type) {
        const data = Buffer.from(source).toString(options.encoding)
        return window.loadURL(`data:${options.type};${options.encoding},${data}`, options)
      }

      // Load source as URL:
      const protocol = url.parse(source).protocol
      if (!protocol) source = 'file://' + source
      return window.loadURL(source, options)
    }

    // Send IPC messages
    function send (...args) {
      return window.webContents.send(...args)
    }

    // Create a child window
    function subwindow (options) {
      return browser(assign({ parent: window }, options))
    }

    // Return methods
    return {load, send, subwindow, native: window}
  }
318960
def get_window():
    """"""
    tform = idaapi.get_current_tform()

    # Required sometimes when closing IDBs and not IDA.
    if not tform:
        tform = idaapi.find_tform("Output window")

    widget = form_to_widget(tform)
    window = widget.window()
    return window
889711
function getElementBoundingRect(elementSelector) {
    /**
     * @param {Window} win
     * @param {Object} [dims]
     * @returns {Object}
     */
    function computeFrameOffset(win, dims) {
        // initialize our result variable
        dims = dims || {
            left: win.pageXOffset,
            top: win.pageYOffset
        };

        // add the offset & recurse up the frame chain
        var frame = win.frameElement;
        if (frame) {
            var rect = frame.getBoundingClientRect();
            dims.left += rect.left + frame.contentWindow.pageXOffset;
            dims.top += rect.top + frame.contentWindow.pageYOffset;

            if (win !== window.top) {
                computeFrameOffset(win.parent, dims);
            }
        }

        return dims;
    }

    /**
     * @param {HTMLElement} element
     * @param {Object} frameOffset
     * @returns {Object}
     */
    function computeElementRect(element, frameOffset) {
        var rect = element.getBoundingClientRect();

        return {
            left: rect.left + frameOffset.left,
            right: rect.right + frameOffset.left,
            top: rect.top + frameOffset.top,
            bottom: rect.bottom + frameOffset.top,
            width: rect.width,
            height: rect.height
        };
    }

    var element = document.querySelectorAll(elementSelector)[0];
    if (element) {
        var frameOffset = computeFrameOffset(window);
        var elementRect = computeElementRect(element, frameOffset);

        return elementRect;
    }
}
18495
function () {
            var self = this, c = self.io.config, uri = c.uri, hostname = uri.hostname, iframe, iframeUri, iframeDesc = iframeMap[hostname];
            var proxy = PROXY_PAGE;
            if (c.xdr && c.xdr.subDomain && c.xdr.subDomain.proxy) {
                proxy = c.xdr.subDomain.proxy;
            }
            if (iframeDesc && iframeDesc.ready) {
                self.nativeXhr = XhrTransportBase.nativeXhr(0, iframeDesc.iframe.contentWindow);
                if (self.nativeXhr) {
                    self.sendInternal();
                } else {
                    LoggerManager.error('document.domain not set correctly!');
                }
                return;
            }
            if (!iframeDesc) {
                iframeDesc = iframeMap[hostname] = {};
                iframe = iframeDesc.iframe = doc.createElement('iframe');
                Dom.css(iframe, {
                    position: 'absolute',
                    left: '-9999px',
                    top: '-9999px'
                });
                Dom.prepend(iframe, doc.body || doc.documentElement);
                iframeUri = {};
                iframeUri.protocol = uri.protocol;
                iframeUri.host = uri.host;
                iframeUri.pathname = proxy;
                iframe.src = url.stringify(iframeUri);
            } else {
                iframe = iframeDesc.iframe;
            }
            Event.on(iframe, 'load', _onLoad, self);
        }
279618
public static DCWindow getAnyWindow() {
        for (final WeakReference<DCWindowContext> ref : _allWindowContexts) {
            final DCWindowContext windowContext = ref.get();
            if (windowContext != null) {
                final List<DCWindow> windows = windowContext.getWindows();
                for (final DCWindow window : windows) {
                    if (window != null) {
                        return window;
                    }
                }
            }
        }
        return null;
    }
430346
function getAllChildren(topWin) {
		var childFrames = []
		var frames = topWin.frames
		var win
		var i = frames.length

		while (i--) {
			win = frames[i]
			childFrames.push(win)
			//include deeper level frames
			childFrames = childFrames.concat(getAllChildren(win))
		}

		return childFrames
	}
1215227
function main() {
  var topWindow = window.top;
  var isTop = window.top === window;

  // Check the top window for options.
  var options = null;
  try {
    var optionsEl = topWindow.document.querySelector('x-wtf-options');
    if (optionsEl) {
      // Options exist in the DOM, use those.
      options = JSON.parse(optionsEl.text);
    }
  } catch (e) {
    // Failed, likely because of cross-domain iframe issues.
  }

  // Grab options - if not found, not injected.
  if (!options) {
    options = fetchOptions(topWindow);
  }
  if (!options) {
    return;
  }

  // Add options to the document for other frames/etc to find.
  if (!optionsEl) {
    try {
      optionsEl = document.createElement('x-wtf-options');
      optionsEl.text = JSON.stringify(options);
      topWindow.document.documentElement.appendChild(optionsEl);
    } catch (e) {
      // Failed, likely because of cross-domain iframe issues.
    }
  }

  if (options['__instrumented__']) {
    // Instrumentation mode.
    if (isTop) {
      // Create a blob that is both the falafel and process scripts.
      // This is used to create the worker.
      var xhr = new XMLHttpRequest();
      xhr.open('GET', chrome.extension.getURL('third_party/falafel.js'), false);
      xhr.send();
      var falafelSource = xhr.responseText;
      xhr = new XMLHttpRequest();
      xhr.open('GET', chrome.extension.getURL('wtf-process.js'), false);
      xhr.send();
      var processSource = xhr.responseText;
      var blob = new Blob([
        falafelSource,
        processSource
      ], {
        type: 'application/javascript'
      });
      var blobUrl = URL.createObjectURL(blob);
      options['wtf.instrumentation.blob'] = blobUrl;

      injectScriptFile(chrome.extension.getURL('third_party/falafel.js'));
      injectScriptFile(chrome.extension.getURL('wtf-process.js'));
      injectScriptFile(chrome.extension.getURL('wtf-call-tracing.js'));
    }
    injectScriptFunction(function(options) {
      // If we are nested in an iframe, protect against cross-origin errors.
      try {
        window.top.wtfi.prepare(options, window);
      } catch (e) {
      }
    }, [
      options
    ]);
  } else {
    // Normal tracing mode.
    // Inject the tracing framework script and the prepare function.
    if (isTop) {
      var traceScriptUrl =
        chrome.extension.getURL('wtf_trace_web_js_compiled.js');
      injectScriptFunction(function(traceScriptUrl) {
        window.WTF_TRACE_SCRIPT_URL = traceScriptUrl;
      }, [traceScriptUrl]);
      injectScriptFile(traceScriptUrl);
    }
    injectScriptFunction(function(options) {
      // If we are nested in an iframe, protect against cross-origin errors.
      try {
        window.top.wtf.trace.prepare(options, window);
      } catch (e) {
      }
    }, [
      options
    ]);

    if (isTop) {
      // Inject addons, if required.
      var addons = injectAddons(options['wtf.addons'] || []);
      // Inject preparation code to start tracing with the desired options.
      injectScriptFunction(startTracing, [
        addons
      ]);
    }
  }

  if (isTop) {
    setupCommunications();
  }
}
591664
function () {
  var getWindow = function () { return ({
    width: window.innerWidth,
    height: window.innerHeight,
    scrollX: window.scrollX,
    scrollY: window.scrollY
  }); };

  var windowStore = createStore("window", {
    getInitialState: getWindow,
    windowOnResize: function (state, data) { return data; },
    windowOnScroll: function (state, data) { return data; }
  });

  function resize() {
    dispatch("windowOnResize", getWindow());
  }

  function scroll() {
    dispatch("windowOnScroll", getWindow());
  }

  window.onresize = resize;
  window.onscroll = scroll;

  return windowStore;
}
805999
function getWindowScrollPosition() {
  invariant(canUseDOM, 'Cannot get current scroll position without a DOM');

  return {
    x: window.pageXOffset || document.documentElement.scrollLeft,
    y: window.pageYOffset || document.documentElement.scrollTop
  };
}
57175
function () {
    var nav = $windowProvider.$get().navigator,
        browserLanguagePropertyKeys = ['language', 'browserLanguage', 'systemLanguage', 'userLanguage'],
        i,
        language;

    // support for HTML 5.1 "navigator.languages"
    if (angular.isArray(nav.languages)) {
      for (i = 0; i < nav.languages.length; i++) {
        language = nav.languages[i];
        if (language && language.length) {
          return language;
        }
      }
    }

    // support for other well known properties in browsers
    for (i = 0; i < browserLanguagePropertyKeys.length; i++) {
      language = nav[browserLanguagePropertyKeys[i]];
      if (language && language.length) {
        return language;
      }
    }

    return null;
  }
407214
function gotoIFrame(src) {
    var iframe = document.createElement("iframe");
    iframe.style.display = "none";
    iframe.src = src;
    document.body.appendChild(iframe);
    return iframe;
  }
464306
function()
		{
			var isVisible = ( this.$.offsetHeight || this.$.offsetWidth ) && this.getComputedStyle( 'visibility' ) != 'hidden',
				elementWindow,
				elementWindowFrame;

			// Webkit and Opera report non-zero offsetHeight despite that
			// element is inside an invisible iframe. (#4542)
			if ( isVisible && ( CKEDITOR.env.webkit || CKEDITOR.env.opera ) )
			{
				elementWindow = this.getWindow();

				if ( !elementWindow.equals( CKEDITOR.document.getWindow() )
						&& ( elementWindowFrame = elementWindow.$.frameElement ) )
				{
					isVisible = new CKEDITOR.dom.element( elementWindowFrame ).isVisible();
				}
			}

			return !!isVisible;
		}
1004136
function (node) {
        return Tools.toArray((node.nodeName === "iframe" ? node.contentDocument || node.contentWindow.document : node).childNodes);
      }