class documentation

Description of a JavaScript object.

Method add_target_and_index Add cross-reference IDs and entries to self.indexnode, if applicable.
Method after_content Handle object de-nesting after content
Method before_content Handle object nesting before content
Method get_display_prefix Undocumented
Method get_index_text Undocumented
Method handle_signature Breaks down construct signatures
Method make_old_id Generate old styled node_id for JS objects.
Class Variable allow_nesting Undocumented
Class Variable has_arguments Undocumented
Class Variable option_spec Undocumented
Method _object_hierarchy_parts Returns a tuple of strings, one entry for each part of the object's hierarchy (e.g. ``('module', 'submodule', 'Class', 'method')``). The returned tuple is used to properly nest children within parents in the table of contents, and can also be used within the :py:meth:`_toc_entry_name` method.
Method _toc_entry_name Returns the text of the table of contents entry for the object.

Inherited from ObjectDescription:

Method get_field_type_map Undocumented
Method get_signatures Retrieve the signatures to document from the directive arguments. By default, signatures are given as arguments, one per line.
Method run Main directive entry function, called by docutils upon encountering the directive.
Method transform_content Called after creating the content through nested parsing, but before the ``object-description-transform`` event is emitted, and before the info-fields are transformed. Can be used to manipulate the content.
Class Variable doc_field_types Undocumented
Class Variable final_argument_whitespace Undocumented
Class Variable has_content Undocumented
Class Variable optional_arguments Undocumented
Class Variable required_arguments Undocumented
Instance Variable domain Undocumented
Instance Variable indexnode Undocumented
Instance Variable names Undocumented
Instance Variable objtype Undocumented
Instance Variable _doc_field_type_map Undocumented

Inherited from SphinxDirective (via ObjectDescription):

Method get_location Get current location info for logging.
Method get_source_info Get source and line number.
Method set_source_info Set source and line number to the node.
Property config Reference to the :class:`.Config` object.
Property env Reference to the :class:`.BuildEnvironment` object.
def add_target_and_index(self, name_obj, sig, signode): (source)

Add cross-reference IDs and entries to self.indexnode, if applicable. *name* is whatever :meth:`handle_signature()` returned.

Parameters
name_obj:tuple[str, str]Undocumented
sig:strUndocumented
signode:desc_signatureUndocumented
def after_content(self): (source)

Handle object de-nesting after content If this class is a nestable object, removing the last nested class prefix ends further nesting in the object. If this class is not a nestable object, the list of classes should not be altered as we didn't affect the nesting levels in :py:meth:`before_content`.

def before_content(self): (source)

Handle object nesting before content :py:class:`JSObject` represents JavaScript language constructs. For constructs that are nestable, this method will build up a stack of the nesting hierarchy so that it can be later de-nested correctly, in :py:meth:`after_content`. For constructs that aren't nestable, the stack is bypassed, and instead only the most recent object is tracked. This object prefix name will be removed with :py:meth:`after_content`. The following keys are used in ``self.env.ref_context``: js:objects Stores the object prefix history. With each nested element, we add the object prefix to this list. When we exit that object's nesting level, :py:meth:`after_content` is triggered and the prefix is removed from the end of the list. js:object Current object prefix. This should generally reflect the last element in the prefix history

def get_display_prefix(self): (source)

Undocumented

Returns
list[Node]Undocumented
def get_index_text(self, objectname, name_obj): (source)

Undocumented

Parameters
objectname:strUndocumented
name_obj:tuple[str, str]Undocumented
Returns
strUndocumented
def handle_signature(self, sig, signode): (source)

Breaks down construct signatures Parses out prefix and argument list from construct definition. The namespace and class will be determined by the nesting of domain directives.

Parameters
sig:strUndocumented
signode:desc_signatureUndocumented
Returns
tuple[str, str]Undocumented
def make_old_id(self, fullname): (source)

Generate old styled node_id for JS objects. .. note:: Old Styled node_id was used until Sphinx-3.0. This will be removed in Sphinx-5.0.

Parameters
fullname:strUndocumented
Returns
strUndocumented
allow_nesting: bool = (source)

Undocumented

has_arguments: bool = (source)

Undocumented

def _object_hierarchy_parts(self, sig_node): (source)

Returns a tuple of strings, one entry for each part of the object's hierarchy (e.g. ``('module', 'submodule', 'Class', 'method')``). The returned tuple is used to properly nest children within parents in the table of contents, and can also be used within the :py:meth:`_toc_entry_name` method. This method must not be used outwith table of contents generation.

Parameters
sig_node:desc_signatureUndocumented
Returns
tuple[str, ...]Undocumented
def _toc_entry_name(self, sig_node): (source)

Returns the text of the table of contents entry for the object. This function is called once, in :py:meth:`run`, to set the name for the table of contents entry (a special attribute ``_toc_name`` is set on the object node, later used in ``environment.collectors.toctree.TocTreeCollector.process_doc().build_toc()`` when the table of contents entries are collected). To support table of contents entries for their objects, domains must override this method, also respecting the configuration setting ``toc_object_entries_show_parents``. Domains must also override :py:meth:`_object_hierarchy_parts`, with one (string) entry for each part of the object's hierarchy. The result of this method is set on the signature node, and can be accessed as ``sig_node['_toc_parts']`` for use within this method. The resulting tuple is also used to properly nest children within parents in the table of contents. An example implementations of this method is within the python domain (:meth:`PyObject._toc_entry_name`). The python domain sets the ``_toc_parts`` attribute within the :py:meth:`handle_signature()` method.

Parameters
sig_node:desc_signatureUndocumented
Returns
strUndocumented