We have an extension with two functions:
- One sets a value to a form field
- The other reads values from the form
We set the value like this:
Code: Select all
Chromium.Browser.MainFrame.ExecuteJavaScript(
Format('cim_extension.formvalue_set("%s", "%s");', [AProdatName, AValue]),
'', 0
);
Code: Select all
if (name = 'formvalue_set') then
begin
// Read values
Chromium.Browser.MainFrame.ExecuteJavaScript('cim_extension.formvalues_get();', '', 0);
end;
if (name = 'formvalues_get') then
begin
// Output the result — but the field is still empty! (even though it appears correct visually)
end;
So — after which event is the field actually updated?