Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

282
Views
visual studio code javaScript lib.dom.d.ts(17177, 5) error

Im coding beginner. I tried import h1 tag So I using document.querySelector function. And I declare variable 'name', but it happens error. why it happens error and how fix that? Fist, This is codes

<!DOCTYPE html>
<html>
    <head>
        <meta charset = "utf-8">
        <title>Test</title>
        <link rel = "stylesheet" href = "style.css">
    </head>
    <body>
        <div class = "title">
            <h1>Grab me!</h1>
        </div>
        <script type = "text/javascript" src = "script.js"></script>
    </body>
</html>
const name = document.querySelector(".title:first-child");
console.dir(name);

It's error(?)

const name: void
@deprecated

'name' is deprecated.ts(6385)
lib.dom.d.ts(17177, 5): The declaration was marked as deprecated here.

I googled but I couldn't find helpful answer😩 (Sorry about my terrible English)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!