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

179
Views
How to capture the children elements

I use a event mouse.click to capture a element. But I can't capture then children element.

This is the code injected.

document.addEventListener('click', function (event)
{
    let elem = event.target;
    //const elem1 = event.target.closest("a");
    let jsonObject =
    {
        Key: 'click',
        Value: elem.parentElement.id || "Unkown",
        Value1: elem.id || elem.name || elem.value || elem.href || elem.className || "Unkown",
        Value2: elem.outerHTML || "Unkown",
        Value3: elem.innerHTML || "Unkown",
        
    };
   
    window.chrome.webview.postMessage(jsonObject);
         
});

I have a multiple choices, but only the elem.outerHTML return something.

This is example : in red the capture with elem.outerHTML. In yellow that is i would like to capture.

enter image description here

But I don't know how to capture it. can someone help me ?

Thanks a lot.

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!