Sha256: 963ec1427dc1ec3339aa6de7d1cd4146c50052ee3522209f9f7a114b5415ba22
Contents?: true
Size: 774 Bytes
Versions: 375
Compression:
Stored size: 774 Bytes
Contents
/* global dom */ /** * Gets the width and height of the viewport; used to calculate the right and bottom boundaries of the viewable area. * @method getViewportSize * @memberof axe.commons.dom * @instance * @param {Object} win The `window` object that should be measured * @return {Object} Object with the `width` and `height` of the viewport */ dom.getViewportSize = function(win) { 'use strict'; var body, doc = win.document, docElement = doc.documentElement; if (win.innerWidth) { return { width: win.innerWidth, height: win.innerHeight }; } if (docElement) { return { width: docElement.clientWidth, height: docElement.clientHeight }; } body = doc.body; return { width: body.clientWidth, height: body.clientHeight }; };
Version data entries
375 entries across 375 versions & 1 rubygems