MCPcopy Index your code
hub / github.com/shipshapecode/tether / destroy

Method destroy

src/js/tether.js:273–294  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

271 }
272
273 destroy() {
274 this.disable();
275
276 this._removeClasses();
277
278 TetherBase.modules.forEach((module) => {
279 if (!isUndefined(module.destroy)) {
280 module.destroy.call(this);
281 }
282 });
283
284 tethers.forEach((tether, i) => {
285 if (tether === this) {
286 tethers.splice(i, 1);
287 }
288 });
289
290 // Remove any elements we were using for convenience from the DOM
291 if (tethers.length === 0) {
292 removeUtilElements(this.bodyElement);
293 }
294 }
295
296 updateAttachClasses(elementAttach, targetAttach) {
297 elementAttach = elementAttach || this.attachment;

Callers 1

tether.spec.jsFile · 0.80

Calls 4

disableMethod · 0.95
_removeClassesMethod · 0.95
isUndefinedFunction · 0.90
removeUtilElementsFunction · 0.90

Tested by

no test coverage detected