Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getOneElement(what, where) {
return DomUtils.getElementsByTagName(what, where, true, 1)[0];
}
function fetch(what, where, recurse) {
function bodyElement(dom) {
return DOMUtils.getElementsByTagName('body', dom, true, 2)[0];
}
function getElements(what, where) {
return DomUtils.getElementsByTagName(what, where, true);
}
function getOneElement(what, where) {
function getElements(what, where) {
return DomUtils.getElementsByTagName(what, where, true);
}
function getOneElement(what, where) {
function headElement(dom) {
return DOMUtils.getElementsByTagName('head', dom, true, 2)[0];
}
function getOneElement(what, where) {
return DomUtils.getElementsByTagName(what, where, true, 1)[0];
}
function fetch(what, where, recurse) {
attribs: {},
children: []
};
DOMUtils.appendChild(styleElement, {
type: ElementType.Text,
data: css
});
const head = DOMUtils.getElementsByTagName('head', dom, true, 2)[0];
if (head)
if (head.children)
DOMUtils.prepend(head.children[0], styleElement);
else
DOMUtils.appendChild(head, styleElement);
else {
const body = DOMUtils.getElementsByTagName('body', dom, true, 2)[0];
if (body)
if (body.children)
DOMUtils.prepend(body.children[0], styleElement);
else
DOMUtils.appendChild(body, styleElement);
else
dom.unshift(styleElement);
}
}
return context.delete('rules');
};