ve.ObjectInspector

ve.Component. ve.ObjectInspector

Refer to ve.Component for methods or fields inherited from this Component's parent such as .options.attributes or .element.

Object inspector similar to DevTools that has nested dropdowns and parses Javascript Object Literals (as opposed to JSON.stringify).

  • Functional binding: veObjectInspector().
Constructor:
  • arg0_value: any|Object
  • arg1_options: Object
    • .key_name="Object": string - The key name of the root object if relevant. Affects IDs in generated HTML.
    • .max_depth=15: number - The maximum recursion depth to display.
Instance:
  • .v: any|Object - The object to display in the inspector window.

Constructor

new ve.ObjectInspector()

Source:

Extends

Members

v :any

Returns the current Object displayed in the inspector.

  • Accessor of: ve.ObjectInspector
Source:
Type:
  • any

v

Sets the new Object to be displayed in the inspector.

  • Accessor of: ve.ObjectInspector
Source:

from_binding

Internal .from_binding setter for handling .options.from_binding. Accepts a string literal that is then parsed to a variable reference.

.to_binding counterparts are manually handled child-side.

Overrides:
Source:

limit

Tests the current this.limit by calling this.limit_function(this.v, this). Otherwise resolves to true if no .options.limit is set.

Overrides:
Source:

name

Returns the visual name of the present ve.Component,

Overrides:
Source:

Methods

#generateHTMLRecursively(arg0_object, arg1_object_keyopt, arg2_optionsopt) → {string}

Recursively parses a JS Object to HTML with collapsible folders.

  • Static method of: ve.ObjectInspector
Source:
Parameters:
Name Type Attributes Default Description
arg0_object any

The item to parse.

arg1_object_key string <optional>
"object"

The root name of the Object being inspected.

arg2_options Object <optional>
Name Type Attributes Default Description
current_depth number <optional>
0

Current recursion depth.

max_depth number <optional>
15

Max depth to recurse.

seen WeakSet <optional>

Circular reference tracking.

Returns:
Type:
string

addComponent()

Adds the current component to this.parent_el should it exist.

Overrides:
Source:

bind(arg0_container_el)

Manually binds/mounts the present ve.Component into the visual DOM.

Overrides:
Source:
Parameters:
Name Type Description
arg0_container_el HTMLElement

fireFromBinding()

Pseudo-setter from binding. Fires only upon program-driven changes to .v directly, which means that this has to be monitored manually component-side in set v(). This should always come last in set v().

Overrides:
Source:

fireToBinding()

Pseudo-setter to binding. Fires only upon user-driven changes, which means that this has to be monitored manually component-side.

Overrides:
Source:

remove()

Removes the component/element from the DOM.

Overrides:
Source:

removeComponent()

Removes the current component from this.parent_el should it exist.

Overrides:
Source:

setOwner(arg0_value, arg1_owner_array)

Sets the root parent and ownership tree. Influences this.parent_el, this.owner, this.owners.

Overrides:
Source:
Parameters:
Name Type Description
arg0_value
arg1_owner_array

setValueFromObject(arg0_object, arg1_object)

Destructures Object values and transfers them into the .v instance fields of each Vercengen component.

Overrides:
Source:
Parameters:
Name Type Description
arg0_object Object

The Vercengen object to transfer to.

arg1_object Object

The other object to transfer from.