<commit_before>import { Window, window } from '@ephox/dom-globals';
import { Fun } from '@ephox/katamari';
import Element from '../node/Element';
import * as Scroll from './Scroll';

export interface Bounds {
  x: () => number;
  y: () => number;
  width: () => number;
  height: () => number;
  right: () => number;
  bottom: () => number;
}

// Experimental support for visual viewport
type VisualViewport = {
  offsetLeft: number,
  offsetTop: number,
  pageLeft: number,
  pageTop: number,
  width: number,
  height: number,
  scale: number,
  addEventListener: (event: string, handler: () => void) => void,
  removeEventListener: (event: string, handler: () => void) => void<commit_msg>TINY-4107: Fixed visual viewport using the wrong event handler type<commit_after>import { EventListenerOrEventListenerObject, Window, window } from '@ephox/dom-globals';
import { Fun } from '@ephox/katamari';
import Element from '../node/Element';
import * as Scroll from './Scroll';

export interface Bounds {
  x: () => number;
  y: () => number;
  width: () => number;
  height: () => number;
  right: () => number;
  bottom: () => number;
}

// Experimental support for visual viewport
type VisualViewport = {
  offsetLeft: number,
  offsetTop: number,
  pageLeft: number,
  pageTop: number,
  width: number,
  height: number,
  scale: number,
  addEventListener: (event: string, handler: EventListenerOrEventListenerObject) => void,
  removeEventListener: (event: string, handler: EventListenerOrEventListenerObject) => void
{'fraction_non_alphanumeric': 0.14539473684210527, 'fraction_numerical': 0.002631578947368421, 'mean_word_length': 4.432142857142857, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '137875', 'n_tokens_mistral': 458, 'n_tokens_neox': 452, 'n_words': 141}