canSyncWrite method

  1. @override
bool canSyncWrite(
  1. Element element
)

Return true if element can be synchronously updated safely because it is not in the live DOM document.

Implementation

@override
bool canSyncWrite(Element element) {
  if (_document is HtmlDocument) {
    return !(_document as HtmlDocument).body!.contains(element);
  }
  return !_document.contains(element);
}