Closed Clayblockunova closed 1 month ago
Thanks for the PR. How did you test these definitions? They're all failing for me. Even just running [].sort.call()
in a browser in non-strict mode is throwing an error.
I just simulate it with [].sort.call(self)
since I think that's the intended behavior. does INCR_CHAR
work under your rest environment? nether CALL_ON_GLOBAL
nor INCR_CHAR
work when I tried to execute JS code with data URI.
as someone mentioned in 2012, CALL_ON_GLOBAL
would be a feature working on super-legacy platforms. IDK whether are those platforms beyond this project's support.
should I close this PR now? or should I do anything else?
Maybe CALL_ON_GLOBAL
would be available in ES3 compliant browsers (that don't support strict mode at all). At least this is what the spec suggests at https://tc39.es/ecma262/#sec-function.prototype.call (NOTE 1):
The thisArg value is passed without modification as the this value. This is a change from Edition 3, where an undefined or null thisArg is replaced with the global object and ToObject is applied to all other values and that result is passed as the this value. Even though the thisArg is passed without modification, non-strict functions still perform these transformations upon entry to the function.
I appreciate the idea of this PR but I don't think that JScrewIt would run on such old browsers. Feel free to close if you don't have any other use cases.
AFAIK from caniuse.com, Android browser 4.0 does not support zero-width chars in identifiers & Immutable undefined. so I reopened the PR, but I still don't know how to simulate.
AFAIK from caniuse.com, Android browser 4.0 does not support zero-width chars in identifiers & Immutable undefined. so I reopened the PR, but I still don't know how to simulate.
I use Android Studio on Windows x64 to emulate old Android devices. Then I usually start a server on the host from the JScrewIt folder, and enter the URL http\://10.0.2.2/JScrewIt.html in Android browser. I haven't been able to check this PR yet.
so, what should I do now?
should I do some change to the makefile? or just leave that for you?
Sorry, being a little busy at the moment. I checked on Android Browser 4.0 and CALL_ON_GLOBAL
is available! But the character definitions are still not working. If you leave this open I could have a later look to see what is wrong.
should I change Array.prototype.fill
definition or just leave it for you?
Array.prototype.fill
does not exist in Android Browser, but even Array.prototype.sort
seems unsafe because if window.length
is greater than zero, it will overwrite global values window[0]
, window[1]
, etc.
according to MDN, window.length
means number of frames in the page. what does window[0]
mean? should I close the PR anyway?
according to MDN,
window.length
means number of frames in the page. what doeswindow[0]
mean?
Yes, those are IFRAME objects. window[0]
is the first IFRAME. The value can be overwritten in JavaScript but the DOM doesn't change accordingly (at least not in Android Browser).
should I close the PR anyway?
We can't introduce side effects in the code. If Array.prototype.sort
is the only alternative then we can't use this feature, sorry.
just tried Array.prototype.concat
.
Just added self
based variant of global objects and functions.
IDK how to simulate it, tho.