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