In latest Zebra mobile Enterprise browser 3.3 EB Javascipt objects should dumped for informational purposes. This is webkit based modern browser running in Android 11.
I tried to dump Log object (https://techdocs.zebra.com/enterprise-browser/3-3/api/log/) using
JSON.stringify(EB.Log)
but this outputs undefined.
Accessing object properties by name like
EB.Log.filePath
or
EB.Application.version
returns proper data.
How to dump whole object content when property names are not known, as much data as possible?
JSON.stringify() works for some Enterprise browser API (https://techdocs.zebra.com/enterprise-browser/3-3/api/) objects:
JSON.stringify(EB.Battery.batteryStatus({}))
JSON.stringify(EB.SignalIndicators.wlanStatus())
For EB.SmartCradle object getAllProperties() returns data:
JSON.stringify(EB.SmartCradle.getAllProperties())
For some objects JSON.stringify does not return data:
JSON.stringify(EB.Log)
JSON.stringify(EB.Application)
JSON.stringify(EB.Barcode.getSupportedProperties())
Using Object.getOwnPropertyNames returns undefined
JSON.stringify(EB.Log, Object.getOwnPropertyNames(EB.Log))
JSON.stringify(EB.Application, Object.getOwnPropertyNames(EB.Application))
Application and Log objects do not have getAllProperties()
and getSupportedProperties()
methods so those cannot used.
Accessing properties by name works but property names are not known and may change if Zebra changes API.
Browser console is not easily accessible in mobile browser. Object data should retrieved using javascript.
How to dump js object for informational purposes in human readable form?