class_docstr: Description of a JavaScript object.
class_docstr_tok: ["Description","of","a","JavaScript","object","."]
code: def add_target_and_index(
      self, name_obj: tuple[str, str], sig: str, signode: desc_signature
  ) -> None:
      mod_name = self.env.ref_context.get("js:module")
      fullname = (mod_name + "." if mod_name else "") + name_obj[0]
      node_id = make_id(self.env, self.state.document, "", fullname)
      signode["ids"].append(node_id)
      self.state.document.note_explicit_target(signode)
  
      domain = cast(JavaScriptDomain, self.env.get_domain("js"))
      domain.note_object(
          fullname, self.objtype, node_id, location=signode
      )
  
      if "no-index-entry" not in self.options:
          indextext = self.get_index_text(mod_name, name_obj)  # type: ignore[arg-type]
          if indextext:
              self.indexnode["entries"].append(
                  ("single", indextext, node_id, "", None)
              )
  
imports: from __future__ import annotations
  import contextlib
  from typing import TYPE_CHECKING, Any, cast
  from docutils import nodes
  from docutils.parsers.rst import directives
  from sphinx import addnodes
  from sphinx.directives import ObjectDescription
  from sphinx.domains import Domain, ObjType
  from sphinx.domains.python import _pseudo_parse_arglist
  from sphinx.locale import _, __
  from sphinx.roles import XRefRole
  from sphinx.util import logging
  from sphinx.util.docfields import Field, GroupedField, TypedField
  from sphinx.util.docutils import SphinxDirective
  from sphinx.util.nodes import make_id, make_refnode, nested_parse_with_titles
label_desc: Use image node_id 4 for calling the JSObject obj's underlying member method code with example usage: obj.add_target_and_index(name_obj, sig, signode) without return types