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

120
Views
What does this action do: document.querySelector('#element')['something'] = 'whatever'?

document.querySelector('#element')['something'] = 'whatever' What am I achieving by setting some sort of invisible attribute on the element? Is there any documentation on this?

I played around with it, confirmed that I can retrieve the value later and now I'm wondering is how useful it is and how reliable it is.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Yes, it can be done. But it's not advised. Remember that html and dom have many standards to adhere to and with changes such as these, you are testing the limits of user's browsers expectations.

This is more clearly explained in the answer to this question: Javascript DOM: Setting custom DOM element properties

about 4 years ago · Juan Pablo Isaza Report
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!