Protect javascript source code for Word addin

Kees Jan Hoogland 21 Reputation points
2021-08-16T10:03:56.62+00:00

Dear community,

We have developed a Word addin in javascript.
All the code for this addin is executed on the client side, no calls are made to a back-end server.
The problem is that all the code is visible by using the 'Attach debugger' option in the sidebar in which the front-end of the addin is shown.
The question: Is it possible to disable this debug option or hide the javascript code in any other way? or is the only way to achieve this to move all the business logic to a back-end server?

Microsoft 365 and Office | Development | Other
0 comments No comments
{count} votes

Accepted answer
  1. Rick Kirkham 281 Reputation points Microsoft Employee
    2021-08-17T20:27:12.73+00:00

    There is no way to hide JavaScript in web apps in general, so you can't hide it in add-ins either. The best you can do is use an obfuscator/minifier tool to make the code difficult for a human to read.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.