Accessor and array index

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Accessor and array index

Postby CephaluS » Sat May 30, 2020 4:16 am

Hello,

I use accessor interface to set/get JS variables. I create a JS object (with associated accessor) that comprises all my JS variables.

I've checked the accessor interface triggers when I set the whole array or create a new one like this:

Code: Select all
my_vars_obj.my_variable = [11, 22, 33];

or
Code: Select all
my_vars_obj.my_variable = new Array(11, 22, 33);


but accessor won't trigger when JS code set specific entries in the array like this:
Code: Select all
my_vars_obj.my_variable[0] = 11;
my_vars_obj.my_variable[1] = 22;
my_vars_obj.my_variable[2] = 33;


I'd like Get()/Set() accessor callbacks to be triggered by single array element value is assigned/read in JS. Is this possible?.
If this can be done, how can I get the specific index of that single value out of Get()/Set() arguments?.

Thank you.
CephaluS
Techie
 
Posts: 21
Joined: Sun Jan 06, 2019 5:22 pm

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 25 guests