Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createTopBufferElement(element) {
const elementName = /^[uo]l$/.test(element.parentNode.localName) ? 'li' : 'div';
const buffer = DOM.createElement(elementName);
const tableElement = element.parentNode.parentNode;
tableElement.parentNode.insertBefore(buffer, tableElement);
buffer.innerHTML = ' ';
return buffer;
}
TableStrategy.prototype.createTopBufferElement = function createTopBufferElement(element) {
var elementName = /^[uo]l$/.test(element.parentNode.localName) ? 'li' : 'div';
var buffer = DOM.createElement(elementName);
var tableElement = element.parentNode.parentNode;
tableElement.parentNode.insertBefore(buffer, tableElement);
buffer.innerHTML = ' ';
return buffer;
};
createTopBufferElement(element: Element): Element {
const elementName = /^[uo]l$/.test(element.parentNode.localName) ? 'li' : 'div';
const buffer = DOM.createElement(elementName);
const tableElement = element.parentNode.parentNode;
tableElement.parentNode.insertBefore(buffer, tableElement);
buffer.innerHTML = ' ';
return buffer;
}
createBuffers(element: Element): [HTMLElement, HTMLElement] {
const parent = element.parentNode;
return [
parent.insertBefore(DOM.createElement('div'), element),
parent.insertBefore(DOM.createElement('div'), element.nextSibling)
];
}
createBuffers(element) {
const parent = element.parentNode;
return [
parent.insertBefore(DOM.createElement('div'), element),
parent.insertBefore(DOM.createElement('div'), element.nextSibling)
];
}
removeBuffers(el, topBuffer, bottomBuffer) {