MCPcopy
hub / github.com/preactjs/preact / teardown

Function teardown

test/_util/helpers.jsx:210–229  ·  view source on GitHub ↗
(scratch)

Source from the content-addressed store, hash-verified

208 * @param {HTMLElement} scratch
209 */
210export function teardown(scratch) {
211 if (!document.contains(scratch)) return;
212
213 if (scratch) {
214 scratch.parentNode.removeChild(scratch);
215 }
216
217 if (oldOptions != null) {
218 assign(options, oldOptions);
219 oldOptions = null;
220 }
221
222 testUtilTeardown();
223
224 if (getLog().length > 0) {
225 clearLog();
226 }
227
228 restoreElementAttributes();
229}
230
231const Foo = () => 'd';
232export const getMixedArray = () =>

Calls 6

getLogFunction · 0.90
clearLogFunction · 0.90
restoreElementAttributesFunction · 0.85
assignFunction · 0.70
containsMethod · 0.65
removeChildMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…