Closed BrotaOne closed 4 years ago
This should work. Can you provide a code sample?
This should work. Can you provide a code sample?
After I found the problem, I tried it with a new html. There is only a little code. //test.html `<!DOCTYPE html>
This isn't very helpful if your script doesn't even contain document.documentElement.clientWidth
; with the code, I want to trigger the same problem you were having.
This isn't very helpful if your script doesn't even contain
document.documentElement.clientWidth
; with the code, I want to trigger the same problem you were having.
So you can't trigger the same problem?
But I didnt change document.documentElement.clientWidth
in my script.
So you can't trigger the same problem?
Where do you access document.documentElement.clientWidth
? I ran your example, opened the devtools and printed the value using the console; and the value was correct.
I get thewrong value in console of Chrome 81.0.4044.113, but in ms edge it is correct
I have the same Chrome version.
What happens if you start a normal http server in your project directory (not parcel) and open the html file in the browser? If it's still wrong, then it's a bug in Chrome.
I have the same Chrome version.
What happens if you start a normal http server in your project directory (not parcel) and open the html file in the browser? If it's still wrong, then it's a bug in Chrome.
Thank you! Maybe it is something wrong with my chrome,I use vue-cli-service to start a server,it is also wrong.But before it was right.
After all, thanks for your help.
Hi everyone!
I use "npx parcel test.html" to start a server,but when I use chrome , the value of document.documentElement.clientWidth is always 768,but when I use edge with chromium ,I get the right value.
And if I open test.html directly with chrome, I also get the right value.
To find if the html file is wrong, I try with a html file with !+Tab in VScode, the result is the same .
I failed uploading my screenshot because of slow network.
Yesterday I used "npx parcel test.html",it works,so did i do something wrong ?
have a nice day!