This function sets one or more style properties on the given element. It is the programmatic alternative to ElementCSSInlineStyle.style
. It also has special support for vendor-prefixed properties.
The suffix Sync differentiates this method from its Async counterpart - writeAsync()
. Unlike the Async counterpart, writeSync()
is a normal function that runs in the same flow with that of the calling code.
import writeSync from '@web-native-js/play-ui/src/css/writeSync.js';