mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-23 00:34:55 +00:00
Replace DomUtil.empty()
with Element.replaceChildren()
(#8736)
This commit is contained in:
@ -63,22 +63,6 @@ describe('DomUtil', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#empty', () => {
|
||||
it('removes all children of element', () => {
|
||||
L.DomUtil.create('div', 'test', el);
|
||||
L.DomUtil.create('div', 'test1', el);
|
||||
L.DomUtil.create('div', 'test2', el);
|
||||
L.DomUtil.empty(el);
|
||||
expect(el.childNodes.length).to.be(0);
|
||||
});
|
||||
|
||||
it('does nothing if element doesn\'t have children', () => {
|
||||
expect(el.childNodes.length).to.be(0);
|
||||
L.DomUtil.empty(el);
|
||||
expect(el.childNodes.length).to.be(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#toFront', () => {
|
||||
it('moves el to last child position parent element', () => {
|
||||
const elm = L.DomUtil.create('div', 'childContainer', el);
|
||||
|
Reference in New Issue
Block a user