This indentation doesn't make sense to me, because you've got zero indent at this point, but you indent four characters on the next line. You're mixing indenting aesthetically (make the function look good) and indenting continuations (logical but ugly.)

Maybe you should use more lines, eg:

assert_throws(
    'NotSupportedError',
    function() { doc2.registerElement(name); },
    'Registering a custom element ... ' +
        'registry ...');