Use document head instead

pull/1047/head
Cagatay Civici 2021-02-25 10:21:04 +03:00
parent dc830ce2ed
commit 68389f03d0
1 changed files with 2 additions and 2 deletions

View File

@ -223,7 +223,7 @@ export default {
if (!this.styleElement) {
this.styleElement = document.createElement('style');
this.styleElement.type = 'text/css';
document.body.appendChild(this.styleElement);
document.head.appendChild(this.styleElement);
let innerHTML = '';
for (let breakpoint in this.breakpoints) {
@ -241,7 +241,7 @@ export default {
},
destroyStyle() {
if (this.styleElement) {
document.body.removeChild(this.styleElement);
document.head.removeChild(this.styleElement);
this.styleElement = null;
}
}