UNPKG

@gechiui/dom

Version:
25 lines (20 loc) 686 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getComputedStyle; var _assertIsDefined = require("../utils/assert-is-defined"); /** * Internal dependencies */ /* eslint-disable jsdoc/valid-types */ /** * @param {Element} element * @return {ReturnType<Window['getComputedStyle']>} The computed style for the element. */ function getComputedStyle(element) { /* eslint-enable jsdoc/valid-types */ (0, _assertIsDefined.assertIsDefined)(element.ownerDocument.defaultView, 'element.ownerDocument.defaultView'); return element.ownerDocument.defaultView.getComputedStyle(element); } //# sourceMappingURL=get-computed-style.js.map