3 ms·
That is true. Bloat is a real problem with this, and so is spyware. Implementing such things will waste memory, energy, and bandwidth anyways. JavaScript as a
by zzo38computer 6y ago
That is true. Bloat is a real problem with this, and so is spyware. Implementing such things will waste memory, energy, and bandwidth anyways.
JavaScript as a programming language is fine (as are others), but including scripts in web pages is often used badly/misused.
I agree that it should hand control back to users. Mostly this includes overriding and affecting DOM functions, and allowing more options to the user. Implement them to be more user-oriented. This includes many options, but also to allow the user to write their own code (which can be used to spoof data, but also for many other purposes). For example, for the camera API, instead of merely asking permission to access the camera, the browser can ask the user what (if any) source to use; the user may select an actual device such as a camera, or enter a filename or a command. (Another reason this would be useful is in case you do not have a camera attached to the computer. If a program scans barcodes using a camera, but you instead have it in a file in your computer, you can select that one instead.) Same is true with microphone, MIDI, etc. Even some things that don't ask should be implemented better, such as keyboard coding. And some things should ask, and user can adjust otherwise, e.g. redirects and other accesses to a server for data. The user should be able to substitute/modify/enable/disable individual scripts in a document, for example, to substitute their own implementation of jQuery.
However, core JavaScript has the Date object, which accesses the current date/time; I thought that the ability to access the current date/time shouldn't belong in core JavaScript, but an implementation could be done to fix this, so that it is overridden like DOM functions are.
Actually, I partially wrote a document about improving web browsers, and it is not only about document scripting, but many other things too. The web developer console is a good feature, but that is just a start. More improvements can be done. This includes implementing many things differently, not only scripts.
- hilbert42 6y ago"Mostly this includes overriding and affecting DOM functions, and allowing more options to the user." Agreed, the problem is that even for browsers such as Mozilla's Firefox, these features are only implemented to the extent or point where they stop short of alienating vested interests. Unfortunately, Mozilla has to keep an eye on its income, thus it's not as free to make decisions to the extent that it ought to be. "…core JavaScript has the Date object, which accesses the current date/time; I thought that the ability to access the current date/time shouldn't belong in core JavaScript…" I agree here too, one can think of various solutions perhaps even 'firewalling' JS code and so on. Irrespective of the technical solutions, given my first point, how does one overcome the impediments and make it happen? Reckon this is the biggest question as Big Tech won't take it lightly (given its potential loss of income if such features were implemented widely). That's why I don't hold much hope for a satisfactory solution anytime soon.