Try to search your question here, if you can't find : Ask Any Question Now ?

I'm using jsdom but still cannot access document

HomeCategory: stackoverflowI'm using jsdom but still cannot access document
Avatarpushpa asked 3 months ago

I’m trying to access an element by id to remove a class but getting error saying TypeError: dom.getElementById is not a function

const jsdom = require("jsdom").JSDOM;

dom = new jsdom("index.html");
jsdom.defaultDocumentFeatures = {
    QuerySelector: true
  };"/login", function(req, res) {

    var email = req.body.emailInput;
    var password = req.body.passwordInput;

    if(email == && password == acct1.password) {

1 Answers
Best Answer
AvatarMatthias answered 3 months ago
Your Answer

3 + 19 =

Popular Tags

WP Facebook Auto Publish Powered By :