It's not about controlling the source code (though that certainly helps), it's about controlling the device. If this was a native app on Linux or even Windows, you could attach a debugger and do the same kind of things whether or not you had the source code. An iOS app, not so much.
> If this was a native app on Linux or even Windows, you could attach a debugger and do the same kind of things whether or not you had the source code.
Notably, though: for a certain value of "you" more narrowly scoped than the "you" capable of writing a few lines of JavaScript.
Nah. Most people can't even write the JavaScript and the ones who can learn that are also generally capable of learning the desktop equivalents.
If there was any difference in difficulty it would be purely arbitrary as a result of which one currently has easier to use tools to do what you're trying to do. A lot of these kinds of things can be done in a few lines of bash or PowerShell.
If there is any fundamental difference, it's that in traditional desktop applications everything is local and the inability to run without an internet connection is something you might complain about. Whereas for a browser you might be surprised if that was even possible, and then there will be things you can't do because you'd need data which is only on the server and is never supplied to the client, or run into rate limiters or be unable to do it privately because your activity generates logs on the server etc.