flowxrc Posted September 9, 2025 Posted September 9, 2025 (edited) There is an issue with the current way the data transfer is handled between different realms (server/client/cef). If I pass a JS object (such as a Date, or my own object) from server to client and vice versa, everything works as expected, however when passing the same object/array/etc from client into CEF, rage serializes, resulting in a string being passed into cef (when expected an array/object). For example: // client browser.call('test', [1, 2, 3]); // browser mp.events.add('test', (arr) => { typeof arr; // string console.log(arr); // '[1,2,3]' }); This is very unintuitive and makes little sense. I understand that it's easier to make a workaround like this but it is not documented anywhere, and creates a print-debugging time sink. Now, the goal of this post is not to properly document it, but improve this system to actually be able to pass objects into CEF, like you can do between the server and the client. Edited September 9, 2025 by flowxrc 1
borsuczyna Posted December 7, 2025 Posted December 7, 2025 would break previous scripts, probably will be never changed
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now