jeudi 4 février 2021

How to make document.querySelectorAll work in node.js

I'm trying to do a test with javascript on working links inside a home page. When I run it through node.js it gives me this error

C:\Users\jimdi\practicaprofesionalizante\ProyectoTesting\testolenick.js:15
        var links = document.querySelectorAll("a");
                    ^
ReferenceError: document is not defined

I've been trying different methods I've found but they do not work on my code.

Code: https://codepen.io/jimdiew/pen/ExNPjrv

Aucun commentaire:

Enregistrer un commentaire