Add wrappers to optionally convert incoming data


Wrappers can be added as a third argument to WebChannel
constructors or by explicitly calling addConverter.
They can be added by supplying their name or by supplying
a function. If the function is not applicable it must return
undefined to proceed to to the next wrapper.

Data is transmitted as JSON when sent over the WebChannel.
Because JSON does not have a date, type QDateTime objects are sent
as ISO 8601 text strings. The "Date" converter converts such
strings to ECMAScript Date objects.

Fixes: QTBUG-98490
Change-Id: I83bb7476b50838359db5b981f500871142fa41f0
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
commit88d2e64cb1436732ce389cbc190bf89312879eef
parentb3e747360f5d341d34c71fce6b68708f699c9907
authorØystein Heskestad <oystein.heskestad@qt.io>
committerØystein Heskestad <oystein.heskestad@qt.io>
commit timeFri, 11 Nov 2022 13:54:39 +0100