handleGetComputedStyleForNode method

void handleGetComputedStyleForNode(
  1. int? id,
  2. Map<String, dynamic> params
)

Implementation

void handleGetComputedStyleForNode(int? id, Map<String, dynamic> params) {
  int nodeId = params['nodeId'];
  Element? element = document.controller.view.getEventTargetById<Element>(nodeId);

  if (element != null) {
    ComputedStyle computedStyle = ComputedStyle(
      computedStyle: buildComputedStyle(element),
    );
    sendToFrontend(id, computedStyle);
  }
}