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

106
Views
Proprietary Web Components

Let's say we have some proprietary web components which were designed and developed for a specific company needs.

Can we safeguard our web components from being used by others? If yes, how?

Note: I am not talking about other developers modifying the component, I am only thinking about others using them straight away in the first place.

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

0

It is just JS. All you can do is delay hackers.

The most you can do is use tools like JSObfuscator and JSFuck to make your code as unreadable as possible. But ofcourse experienced hackers have tools also...

Then it dawned me; it is all about adding extra hurdles, and there is one more hurdle we can call to action.

I wrote a nerdy DEV.to blog post about using the URI to encode your Web Components

Basically boils down to NOT putting the Dictionary in the file itself, like Obfuscators do;
but placing the encoding dictionary in the URI (Domain Path even better!):

<script src="element.js?-customElements-define-HTMLElement-"></script>

And executing:

let D = document.currentScript.src.split`-`;

// D = ["element.js?","customElements","define","HTMLElement"];

window[D[1]][D[2]]("my-element",class extends window[D[3]]{ ... });
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!