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

Function restoreElementAttributes

test/_util/helpers.jsx:286–296  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

284}
285
286function restoreElementAttributes() {
287 if (originalAttributesPropDescriptor) {
288 // Workaround bug in Sinon where getter/setter spies don't get auto-restored
289 Object.defineProperty(
290 Element.prototype,
291 'attributes',
292 originalAttributesPropDescriptor
293 );
294 attributesSpy = null;
295 }
296}

Callers 1

teardownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…