handleGetComputedStyleForNode method

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

Implementation

void handleGetComputedStyleForNode(int? id, Map<String, dynamic> params) {
  int nodeId = view.getTargetIdByNodeId(params['nodeId']);
  BindingObject? element = view.getBindingObject<BindingObject>(Pointer.fromAddress(nodeId));

  if (element is Element) {
    ComputedStyle computedStyle = ComputedStyle(
      computedStyle: buildComputedStyle(element),
    );
    sendToFrontend(id, computedStyle);
  }
}