prefer getElementById
This commit is contained in:
parent
7f2037ae69
commit
a1a0ca11ef
2 changed files with 7 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
const error = document.querySelector("#error");
|
const error = document.getElementById("error");
|
||||||
const errorCode = document.querySelector("#error-code");
|
const errorCode = document.getElementById("error-code");
|
||||||
const registerButton = document.querySelector("#register-sw");
|
const registerButton = document.getElementById("register-sw");
|
||||||
|
|
||||||
if (location.pathname.startsWith(__uv$config.prefix)) {
|
if (location.pathname.startsWith(__uv$config.prefix)) {
|
||||||
error.textContent = "Error: The service worker is not registered.";
|
error.textContent = "Error: The service worker is not registered.";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
const form = document.querySelector("#uv-form");
|
const form = document.getElementById("uv-form");
|
||||||
const input = document.querySelector("#uv-address");
|
const input = document.getElementById("uv-address");
|
||||||
const error = document.querySelector("#error");
|
const error = document.getElementById("error");
|
||||||
const errorCode = document.querySelector("#error-code");
|
const errorCode = document.getElementById("error-code");
|
||||||
|
|
||||||
function isUrl(val = "") {
|
function isUrl(val = "") {
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue