Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

115
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda