@cartel: I think I'm somewhat in over my head with Moonchild's response to your post... I think only Giorgio can answer his question re: whether there's something they can implement in PaleMoon itself to fix this. Given that it does work in modern Gecko, naively I'd say the answer is yes but I wouldn't know where to start looking; and I don't think that the $S() function is the only thing that's broken about the surrogates system (in PaleMoon) right now...
Anyway, since he's specifically interested in fixing the $S() issue, and if he's not watching this thread himself, you can tell him that the related code is in
Code: Select all
in the _preamble function, and the point of it & $S is to provide a shim for __noSuchMethod__ using Proxy, on all browsers that support Proxy & the "new Proxy()" syntax. (_preamble injects the $S into the surrogate scope.) Maybe someone on the PaleMoon forums can boil it down to a test case that Moonchild can use, given this information (I'd do it myself with some guidance but I really don't have much time atm).
EDIT I can try to find the latest broken Gecko version & cross compare each w/ PaleMoon 25.6, if that will help?