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

131
Views
How to select element from HTMLElement

I am trying to select elements from the HTML Element. But not working. How to do it? I have used query selector but it is not working. Only it is working inside settimeout. Without settimeout how to achieve?

HTML: Getting this from console.log(drop);

<div class="container">
<dropdown-part>
 <select>
 <option>2</option>
 </select>
</dropdown-part>
</div>

TypeScript:

let dropcover = this.shadowRoot.querySelector('.container') as HTMLElement;
console.log(drop);
 
console.log(dropcover.querySelector('dropdown-part')); // Getting null

setTimeout(function(){
   console.log(dropcover.querySelector('dropdown-part')); // working
},0);
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!