'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.'

def handle_signature(self, sig, signode):

    sig = sig.strip()
    if (('(' in sig) and (sig[(-1):] == ')')):
        (member, arglist) = sig.split('(', 1)
        member = member.strip()
        arglist = arglist[:(-1)].strip()
    else:
        member = sig
        arglist = None
    prefix = self.env.ref_context.get('js:object', None)
    mod_name = self.env.ref_context.get('js:module')
    name = member
    try:
        (member_prefix, member_name) = member.rsplit('.', 1)
    except ValueError:
        member_name = name
        member_prefix = ''
    finally:
        name = member_name
        if (prefix and member_prefix):
            prefix = '.'.join([prefix, member_prefix])
        elif ((prefix is None) and member_prefix):
            prefix = member_prefix
    fullname = name
    if prefix:
        fullname = '.'.join([prefix, name])
    signode['module'] = mod_name
    signode['object'] = prefix
    signode['fullname'] = fullname
    if self.display_prefix:
        signode += addnodes.desc_annotation(self.display_prefix, self.display_prefix)
    if prefix:
        signode += addnodes.desc_addname((prefix + '.'), (prefix + '.'))
    elif mod_name:
        signode += addnodes.desc_addname((mod_name + '.'), (mod_name + '.'))
    signode += addnodes.desc_name(name, name)
    if self.has_arguments:
        if (not arglist):
            signode += addnodes.desc_parameterlist()
        else:
            _pseudo_parse_arglist(signode, arglist)
    return (fullname, prefix)
