UNPKG
@antv/dom-util
Version:
latest (2.0.4)
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
A common util collection for antv projects
github.com/antvis/util
antvis/util
@antv/dom-util
/
src
/
modify-css.ts
11 lines
(10 loc)
•
243 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
export
default
function
modifyCSS
(
dom
:
HTMLElement
,
css
: { [key:
string
]:
any
}
):
HTMLElement
{
if
(dom) {
for
(
const
key
in
css) {
if
(css.
hasOwnProperty
(key)) { dom.
style
[key] = css[key]; } } }
return
dom; }