Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit c0775b8

Browse files
jonataswalkerznck
authored andcommitted
Change document.create to document.createElement (#75)
1 parent 26b6b97 commit c0775b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/vueTransform.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export default async function vueTransform (code, id, options) {
196196
(function(){
197197
if(document){
198198
var head=document.head||document.getElementsByTagName('head')[0],
199-
style=document.create('style'),
199+
style=document.createElement('style'),
200200
css=${JSON.stringify(style)};
201201
style.type='text/css';
202202
if (style.styleSheet){

Diff for: test/expects/no-css-extract.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function(){ if(document){ var head=document.head||document.getElementsByTagName('head')[0], style=document.create('style'), css=" .bar { color: blue } .foo { color: red; } "; style.type='text/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); } })();
1+
(function(){ if(document){ var head=document.head||document.getElementsByTagName('head')[0], style=document.createElement('style'), css=" .bar { color: blue } .foo { color: red; } "; style.type='text/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); } })();
22

33

44

0 commit comments

Comments
 (0)