Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Latest commit

 

History

History
14 lines (9 loc) · 911 Bytes

writeasync.md

File metadata and controls

14 lines (9 loc) · 911 Bytes

CSS/writeAsync()

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 Async differentiates this method from its Sync counterpart - writeSync(). Unlike the Sync counterpart, writeAsync() is a promised-based function that runs in a different flow from that of the calling code. It follows a performance strategy that lets the browser engine decide the most convenient time to honour its call.

Import

import writeAsync from '@web-native-js/play-ui/src/css/writeAsync.js';

Syntax

See cssAsync() - Set/Unset Inline Styles