Use document head instead
parent
dc830ce2ed
commit
68389f03d0
|
@ -223,7 +223,7 @@ export default {
|
||||||
if (!this.styleElement) {
|
if (!this.styleElement) {
|
||||||
this.styleElement = document.createElement('style');
|
this.styleElement = document.createElement('style');
|
||||||
this.styleElement.type = 'text/css';
|
this.styleElement.type = 'text/css';
|
||||||
document.body.appendChild(this.styleElement);
|
document.head.appendChild(this.styleElement);
|
||||||
|
|
||||||
let innerHTML = '';
|
let innerHTML = '';
|
||||||
for (let breakpoint in this.breakpoints) {
|
for (let breakpoint in this.breakpoints) {
|
||||||
|
@ -241,7 +241,7 @@ export default {
|
||||||
},
|
},
|
||||||
destroyStyle() {
|
destroyStyle() {
|
||||||
if (this.styleElement) {
|
if (this.styleElement) {
|
||||||
document.body.removeChild(this.styleElement);
|
document.head.removeChild(this.styleElement);
|
||||||
this.styleElement = null;
|
this.styleElement = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue