Class CustomPreview

java.lang.Object
com.oracle.truffle.tools.chromeinspector.types.CustomPreview

public final class CustomPreview extends Object
Custom preview of an object through devtools formatter, which is registered as devtoolsFormatters array on the global object. The array contains formatter objects, which may have header, hasBody and body properties, whose values are executables. The executables accept the object to format and an optional context. The return value of header and body is a JsonML [tag-name, attributes, element-list] tuple that is then converted into a DOM element in the client UI. The return value of hasBody is just true or false depending on whether the body should be shown, or not. The header may return null if the formatter should not be applied on the object.

The element list may contain child template objects of the following form: ["object", {"object": objectToInspect, "config": configObject}] The child element is then created by applying formatter to objectToInspect and configObject.

The following HTML tags are allowed: div, span, ol, li, table, tr, td.