DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (329340b1608d)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<!DOCTYPE html>
<title>NDEFErrorEvent constructor</title>
<link rel="help" href="https://w3c.github.io/web-nfc/#dom-ndeferrorevent">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
  test(() => {
    assert_equals(NDEFErrorEvent.length, 2);
    assert_throws(new TypeError, () => new NDEFErrorEvent('error'));
  }, 'NDEFErrorEvent constructor without init dict');

  test(() => {
    assert_throws(new TypeError, () => new NDEFErrorEvent('error', { error : null }));
  }, 'NDEFErrorEvent constructor with a null that is not of type DOMException');

  test(() => {
    const event = new NDEFErrorEvent('error', { error : new DOMException() });
    assert_true(event.error instanceof DOMException);
  }, 'NDEFErrorEvent constructor with a valid DOMException');
</script>