handleGetInlineStylesForNode method

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

Implementation

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

  if (element != null) {
    InlinedStyle inlinedStyle = InlinedStyle(
      inlineStyle: buildInlineStyle(element),
      attributesStyle: buildAttributesStyle(element.attributes),
    );
    sendToFrontend(id, inlinedStyle);
  }
}