Is JavaScript becoming less and less libre?

It’s not a JS programming question but more of a JS history and JS philosophy question.

Is JavaScript becoming less and less libre?
Are there “big companies with big interests” who try to make it harder and harder to manipulate HTML documents that include JavaScript?

Things like:

  • Shadow DOMs or shadow roots (especially “closed” ones) which can’t be clasically manipulated even by JS browser console
  • The need to dispatchEvent(new Event('change')); after autofilling a field in some forms
  • Dynamic loading of image files, audio files and video files from Binary Large Objects (“BLObs”) as with src="blobb:https://edition.example.com/2a50dbb4-fee9-48a7-ae8b-f72b579169b0" which are deleted right after the file is loaded in a player, to the end-user

It’s as if some developers of the language intentionally restrict users from doing certain stuff with the language. Was any other programming language ever restricted in similar ways?

1 Like

Definitely.

Much of what you describe is not the languages but how they are used.

Look at it from the point of view of the developers and the company they develop for. They want to protect the software they developed, and the data. They also want to enforce some of the actions done in applications.

I did not know what that is but when I search the internet the answers are that the purpose is for something such as so document-level CSS can’t restyle the button by accident. Note that it is not JavaScript. Shadow DOMs can also be used to build components. I assume they are also used to intentionally hide the code from us. An example of hiding code in other languages is, developers like compilers that generate machine language because it is difficult for people to understand the machine language. Other languages such as Java and C# are compiled to code that is easier for people to understand and therefore there are programs that can obfuscate the code and make it difficult for people to understand.

That can be performance improvements.

Well of course. They want to protect their property. They want to ensure we view their content in their website in the manner they determine.

Also note that server-side applications are even more difficult to look at, it should be impossible to look at if the developers want to hide it. The code and the data for them can be highly protected.

2 Likes

Well object-oriented langues had the concept of member access modifiers (private / public) long before. It’s a matter of encapsulation, the intent is just no to expose internal state which should be considered an implementation detail.

2 Likes

Absolutely, object-oriented languages use access modifiers to enforce encapsulation, concealing internal details and maintaining the integrity of an object’s implementation.

2 Likes

Is that a problem of Javascript, though?

What are you suggesting they do instead? Force people not to use BLObs? Is that more “libre”? Or less?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.