Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

2.1 KB
Raw Blame
<!doctype html>
<meta charset="utf-8">
<script src="/wpt/resources/testharness.js"></script>
<script src="/wpt/resources/testharnessreport.js"></script>
<script src="/wpt/resources/moli-wpt-adapter.js"></script>
<script src="/wpt/resources/WebIDLParser.js"></script>
<script src="/wpt/resources/idlharness.js"></script>
<script>
idl_test([`
interface Event {
  constructor(DOMString type, optional EventInit eventInitDict = {});
  readonly attribute DOMString type;
  readonly attribute object? target;
  readonly attribute object? srcElement;
  readonly attribute object? currentTarget;
  readonly attribute unsigned short eventPhase;
  undefined stopPropagation();
  undefined stopImmediatePropagation();
  undefined preventDefault();
  readonly attribute boolean defaultPrevented;
  sequence<object> composedPath();
  undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false);
  readonly attribute boolean bubbles;
  readonly attribute boolean cancelable;
  attribute boolean cancelBubble;
  readonly attribute boolean composed;
  readonly attribute boolean isTrusted;
  readonly attribute DOMHighResTimeStamp timeStamp;
};

interface CustomEvent : Event {
  constructor(DOMString type, optional CustomEventInit eventInitDict = {});
  readonly attribute any detail;
  undefined initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null);
};

interface MessageEvent : Event {
  constructor(DOMString type, optional MessageEventInit eventInitDict = {});
  readonly attribute any data;
  readonly attribute USVString origin;
  readonly attribute DOMString lastEventId;
  readonly attribute object? source;
  readonly attribute sequence<object> ports;
};
`], [], function (idlArray) {
  idlArray.enable_function_length_assertions();
  idlArray.enable_interface_descriptor_assertions();
  idlArray.enable_operation_descriptor_assertions();
  idlArray.enable_object_brand_assertions();
  idlArray.add_objects({
    Event: ["new Event('event-idl')"],
    CustomEvent: ["new CustomEvent('custom-idl')"],
    MessageEvent: ["new MessageEvent('message-idl')"]
  });
});
</script>