class JSObject(ObjectDescription[Tuple[str, str]]):
Known subclasses: sphinx.domains.javascript.JSCallable
Method | add_target_and_index |
Undocumented |
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 |
Undocumented
Parameters | |
name_obj:Tuple[ | Undocumented |
sig:str | Undocumented |
signode:desc_signature | Undocumented |
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
before_content
.
Handle object nesting before content
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
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 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,
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
sphinx.domains.javascript.JSConstructor
Undocumented
Returns | |
List[ | Undocumented |
Undocumented
Parameters | |
objectname:str | Undocumented |
name_obj:Tuple[ | Undocumented |
Returns | |
str | Undocumented |
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:str | Undocumented |
signode:desc_signature | Undocumented |
Returns | |
Tuple[ | Undocumented |