parse attributes in `linq.dom.inject`.

This commit is contained in:
Rintim 2023-09-28 19:13:36 +08:00
parent b10b449a0d
commit e0dd38625b
1 changed files with 4 additions and 0 deletions

View File

@ -7798,6 +7798,10 @@
else element.classList.add(item);
}
}
//处理属性
if(options.attributes){
for(const item in options.attributes) element.setAttribute(item,options.attributes[item]);
}
//处理样式
if(options.style){
for(const item in options.style) element.style[item] = options.style[item];