private function addStylesToElement($xpath, $styles) { foreach ($styles as $style => $value) { parent::executeJsOnXpath($xpath, '{{ELEMENT}}.style.' . $style . ' = "' . $value . '";', true); } }