Native SendDuiMessage does not seem to work

When using SendDuiMessage FiveM returns the error message shown below.

To reproduce this bug, execute this script

local dui = CreateDui("www.example.com", 1, 1)
local hndl = GetDuiHandle(dui)
local json = json.encode({foo='bar'})

SendDuiMessage(hndl, json)

What about SendDuiMessage(dui, json)?

SEND_DUI_MESSAGE expects param #1 to be a long reflective of the DUI browser handle.

GET_DUI_HANDLE returns the NUI window handle (char*)

Ah, right, thank you. Thought that SendNuiMessage and SendDuiMessage would be identical.

Are you able to send key message to dui ? I’m trying to write text on dui browser but can’t manage it to work ?

Nope, wanted to test it out thoroughly before making a new bug report and just didn’t remember to make one.

Is it possible to make ? I mean write on DUI browser .