Telefonica / webview-bridge

Novum JavaScript Bridge
MIT License
26 stars 7 forks source link

Fix on setUserProperty function documentation #92

Closed jprietoTuenti closed 1 year ago

jprietoTuenti commented 1 year ago

During the implementation to add support of the setUserProperty on B2P app we stumbled upon this failure when calling the javascript function as documented:

[WebViewsJavascript] console.warn: ["Trying to set analytics user property without name or value",{"name":"customProperty","value":"some value"},null] <WebView ID: 3>

Is it possible that the documentation is outdated? I PR a proposal for the fixed documentation

jprietoTuenti commented 1 year ago

yes, the docs are wrong, thanks for the fix ;)

Anyway, TS/Flow types should have warned you

The javascript call was made from a "cutremock" webview at twiremock, I didn't even write the code using VSC xD. In a real project and a real IDE, sure it would probably have warned me