import { BoundItemAttribute } from "../BoundItemAttribute" ; import { UkuleleUtil } from "../../util/UkuleleUtil" ; export class BoundItemAttrStyle extends BoundItemAttribute { constructor ( attrName , ukuTag , element , uku ) { if ( ukuTag !== "style" ) { throw new TypeError ( "it doesn't use uku-style" ) ; } super ( attrName , ukuTag , element , uku ) ; } render ( controllers ) { let attr = this . attributeName ; let elementName = this . element . tagName ; let finalValue = UkuleleUtil . getFinalValue ( controllers , attr ) ; for ( let cssName in finalValue ) { this . element . style [ cssName ] = finalValue [ cssName ] ; } } }