For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/lynx-devtool-native-api/lynx-base-inspector-owner/get-console-object.md.
Lynx
  • English
  • getConsoleObject

    For Object type console messages, this method can be used to retrieve its detailed information.

    To learn how to obtain this data, please refer to LynxInspectorConsoleDelegate.

    Syntax

    iOS

    LynxBaseInspectorOwner.h
    - (void)getConsoleObject:(NSString *_Nonnull)objectId
               needStringify:(BOOL)stringify
               resultHandler:(void (^_Nonnull)(NSString *_Nonnull detail))handler;

    Android

    LynxBaseInspectorOwner.java
    void getConsoleObject(String objectId, boolean needStringify, Callback callback);

    Harmony

    LynxBaseInspectorOwner.ets
    getConsoleObject(objectId: string, needStringify: boolean, callback: (detail: string) => void): void;

    Parameters

    • objectId: The unique identifier of the Object to be retrieved. Please refer to objectId.
    • stringify / needStringify: Whether the Object needs to be serialized into a string.
      • If true, it is equivalent to calling the JSON.stringify method.
      • If false, it returns only the top-level properties of the Object (non-recursive). If a property's value is another Object, only its basic information is returned. You must call this method again with the new objectId to retrieve its internal properties.
    • handler / callback: A callback that receives the result as a single String parameter.

    Data Format

    All data is in the form of a JSON formatted string.

    • If needStringify is true: Returns the complete serialized JSON string of the Object.

    • If needStringify is false: Returns the top-level properties of the Object (non-recursive). It is an array, and the format of each element is as follows:

      FieldTypeDescription
      namestringProperty name
      valueargumentProperty value

    Example

    Please refer to LynxInspectorConsoleDelegate.

    Usage Example

    Please refer to LynxInspectorConsoleDelegate.

    Compatibility

    LCD tables only load in the browser

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.