MCPcopy
hub / github.com/vuejs/core / resetHead

Function resetHead

packages/vue/__tests__/e2e/e2eBrowserUtils.ts:201–213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199 }
200
201 function resetHead() {
202 Array.from(document.head.childNodes).forEach(node => {
203 if (
204 !initialHeadNodes.has(node) &&
205 !(
206 node instanceof HTMLStyleElement &&
207 node.dataset.vueTransitionE2e != null
208 )
209 ) {
210 node.remove()
211 }
212 })
213 }
214
215 async function resetPage() {
216 // Browser mode runs in Vitest's iframe instead of loading transition.html.

Callers 1

resetPageFunction · 0.85

Calls 3

forEachMethod · 0.80
hasMethod · 0.80
removeMethod · 0.80

Tested by

no test coverage detected