Skip to content

Commit

Permalink
Merge oncopy/oncut/onpaste into GlobalEventHandlers (web-platform-tes…
Browse files Browse the repository at this point in the history
  • Loading branch information
foolip authored Dec 21, 2022
1 parent 66a2552 commit cae0fb2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@ const handlersListPromise = fetch("/interfaces/html.idl").then(res => res.text()
const parsedHTMLIDL = WebIDL2.parse(htmlIDL);
const windowEventHandlers = handlersInInterface(parsedHTMLIDL, "WindowEventHandlers");
const globalEventHandlers = handlersInInterface(parsedHTMLIDL, "GlobalEventHandlers");
const documentAndElementEventHandlers = handlersInInterface(parsedHTMLIDL, "DocumentAndElementEventHandlers");

const shadowedHandlers = [
...windowReflectingBodyElementEventHandlerSet,
...windowEventHandlers
];
const notShadowedHandlers = [
...globalEventHandlers.filter(name => !windowReflectingBodyElementEventHandlerSet.has(name)),
...documentAndElementEventHandlers
];
const notShadowedHandlers = globalEventHandlers.filter(name => !windowReflectingBodyElementEventHandlerSet.has(name));
return {
shadowedHandlers,
notShadowedHandlers
Expand Down
1 change: 0 additions & 1 deletion interfaces/SVG.idl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ interface SVGElement : Element {
};

SVGElement includes GlobalEventHandlers;
SVGElement includes DocumentAndElementEventHandlers;
SVGElement includes SVGElementInstance;
SVGElement includes HTMLOrSVGElement;

Expand Down
11 changes: 3 additions & 8 deletions interfaces/html.idl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ partial interface Document {
// also has obsolete members
};
Document includes GlobalEventHandlers;
Document includes DocumentAndElementEventHandlers;

partial interface mixin DocumentOrShadowRoot {
readonly attribute Element? activeElement;
Expand Down Expand Up @@ -131,7 +130,6 @@ interface HTMLElement : Element {
};

HTMLElement includes GlobalEventHandlers;
HTMLElement includes DocumentAndElementEventHandlers;
HTMLElement includes ElementContentEditable;
HTMLElement includes HTMLOrSVGElement;

Expand Down Expand Up @@ -1905,7 +1903,9 @@ interface mixin GlobalEventHandlers {
attribute EventHandler oncontextlost;
attribute EventHandler oncontextmenu;
attribute EventHandler oncontextrestored;
attribute EventHandler oncopy;
attribute EventHandler oncuechange;
attribute EventHandler oncut;
attribute EventHandler ondblclick;
attribute EventHandler ondrag;
attribute EventHandler ondragend;
Expand Down Expand Up @@ -1936,6 +1936,7 @@ interface mixin GlobalEventHandlers {
attribute EventHandler onmouseout;
attribute EventHandler onmouseover;
attribute EventHandler onmouseup;
attribute EventHandler onpaste;
attribute EventHandler onpause;
attribute EventHandler onplay;
attribute EventHandler onplaying;
Expand Down Expand Up @@ -1983,12 +1984,6 @@ interface mixin WindowEventHandlers {
attribute EventHandler onunload;
};

interface mixin DocumentAndElementEventHandlers {
attribute EventHandler oncopy;
attribute EventHandler oncut;
attribute EventHandler onpaste;
};

typedef (DOMString or Function) TimerHandler;

interface mixin WindowOrWorkerGlobalScope {
Expand Down
1 change: 0 additions & 1 deletion interfaces/mathml-core.idl
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
[Exposed=Window]
interface MathMLElement : Element { };
MathMLElement includes GlobalEventHandlers;
MathMLElement includes DocumentAndElementEventHandlers;
MathMLElement includes HTMLOrSVGElement;
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!DOCTYPE html>
<title>DocumentAndElementEventHandlers / clipboard events for MathML</title>
<title>clipboard event handlers for MathML</title>
<link rel="help" href="https://w3c.github.io/mathml-core/#dom-and-javascript"/>
<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#documentandelementeventhandlers"/>
<link rel="help" href="https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers"/>
<link rel="help" href="https://w3c.github.io/clipboard-apis/#clipboard-event-copy"/>
<link rel="help" href="https://w3c.github.io/clipboard-apis/#clipboard-event-cut"/>
<link rel="help" href="https://w3c.github.io/clipboard-apis/#clipboard-event-paste"/>
<meta
name="assert"
content="MathMLElements incorporate a functional DocumentAndElementEventHandlers interface"
content="MathMLElements incorporates oncopy / oncut / onpaste event handlers"
/>

<script src="/resources/testharness.js"></script>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cae0fb2

Please sign in to comment.