handleGetMatchedStylesForNode method

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

Implementation

void handleGetMatchedStylesForNode(int? id, Map<String, dynamic> params) {
  int nodeId = params['nodeId'];
  Element? element = document.controller.view.getEventTargetById<Element>(nodeId);
  if (element != null) {
    MatchedStyles matchedStyles = MatchedStyles(
      inlineStyle: buildInlineStyle(element),
    );
    sendToFrontend(id, matchedStyles);
  }
}