16 foreach ($resultList as $pos => $res)
18 if ($res->getNodeType() === $res::ELEMENT_NODE)
20 $classList = trim($res->getAttribute(
'class'));
23 $data[
'classList'][$pos] = $classList;
26 $styles = StyleInliner::getStyle($res);
28 foreach ($styles as $key => $style)
30 if ($style && $key !==
'background-image')
32 $stylesPrepared[$key] = $style;
34 if ($key ===
'background-image' && $style ===
'')
36 $stylesPrepared[$key] = $style;
39 if (!empty($stylesPrepared))
41 $data[
'style'][$pos] = $stylesPrepared;