1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = void 0;
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | function setStyle(style) {
|
14 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
15 | if (!style) {
|
16 | return {};
|
17 | }
|
18 | var _options$element = options.element,
|
19 | element = _options$element === void 0 ? document.body : _options$element;
|
20 | var oldStyle = {};
|
21 | var styleKeys = Object.keys(style);
|
22 |
|
23 |
|
24 | styleKeys.forEach(function (key) {
|
25 | oldStyle[key] = element.style[key];
|
26 | });
|
27 | styleKeys.forEach(function (key) {
|
28 | element.style[key] = style[key];
|
29 | });
|
30 | return oldStyle;
|
31 | }
|
32 | var _default = exports.default = setStyle; |
\ | No newline at end of file |