'use strict'
document.oncontextmenu = ev => {
return false;
}
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script src="./src/Scripts/ContextMenuOff.js"></script>
</body>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script>
document.oncontextmenu = ev => {
return false;
}
</script>
</body>