* Destroys the popper. * @method * @memberof Popper
()
| 3966 | |
| 3967 | |
| 3968 | function destroy() { |
| 3969 | this.state.isDestroyed = true; // touch DOM only if `applyStyle` modifier is enabled |
| 3970 | |
| 3971 | if (isModifierEnabled(this.modifiers, 'applyStyle')) { |
| 3972 | this.popper.removeAttribute('x-placement'); |
| 3973 | this.popper.style.position = ''; |
| 3974 | this.popper.style.top = ''; |
| 3975 | this.popper.style.left = ''; |
| 3976 | this.popper.style.right = ''; |
| 3977 | this.popper.style.bottom = ''; |
| 3978 | this.popper.style.willChange = ''; |
| 3979 | this.popper.style[getSupportedPropertyName('transform')] = ''; |
| 3980 | } |
| 3981 | |
| 3982 | this.disableEventListeners(); // remove the popper if user explicity asked for the deletion on destroy |
| 3983 | // do not use `remove` because IE11 doesn't support it |
| 3984 | |
| 3985 | if (this.options.removeOnDestroy) { |
| 3986 | this.popper.parentNode.removeChild(this.popper); |
| 3987 | } |
| 3988 | |
| 3989 | return this; |
| 3990 | } |
| 3991 | /** |
| 3992 | * Get the window associated with the element |
| 3993 | * @argument {Element} element |
nothing calls this directly
no test coverage detected
searching dependent graphs…