You appear to be a bot. Output may be restricted
Description
Checks that $this->domDocument has a BODY element and adds it if it is missing.
Usage
$void = AbstractHtmlProcessor::ensureExistenceOfBodyElement();
Parameters
Returns
void
Source
File name: woocommerce/vendor/pelago/emogrifier/src/Emogrifier/HtmlProcessor/AbstractHtmlProcessor.php
Lines:
1 to 13 of 13
private function ensureExistenceOfBodyElement() { if ($this->domDocument->getElementsByTagName('body')->item(0) !== null) { return; } $htmlElement = $this->domDocument->getElementsByTagName('html')->item(0); if ($htmlElement === null) { throw new \UnexpectedValueException('There is no HTML element although there should be one.', 1569930853); } $htmlElement->appendChild($this->domDocument->createElement('body')); }