();
    assert_throws_dom(
      'SyntaxError',
      () => customElements.define(invalidName, newClass),
      `customElements.define should have thrown for invalid name: ${debugString(invalidName)}`);
    await promise_rejects_dom(t, 'SyntaxError',
      customElements.whenDefined(invalidName),
      `customElements.whenDefined should have thrown for invalid name: ${debugString(invalidName)}`);
  }
});
</script>
