Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / DOMContextMenuEvent.html
blobab1998f16300efee3490fc5a53625b8613ce6e2a
1 <html>
2 <script type="text/javascript">
4 function context_event(event)
6 if (window.event)
8 event = window.event;
10 var swallow = document.getElementById("swallow_context").checked;
12 var str =
13 "EVENT PROPERTIES<br>" +
14 "cancelable = "+event.cancelable+"<br>" +
15 "ctrlKey = "+event.ctrlKey+"<br>" +
16 "metaKey = "+event.metaKey+"<br>" +
17 "shiftKey = "+event.shiftKey+"<br>" +
18 "<br>" +
19 "TEST PROPERTIES<br>" +
20 "prevent default = "+swallow+"<br>" +
21 "event time = "+new Date()+"<br>" +
22 "";
23 document.getElementById("event_info").innerHTML=str;
25 if (swallow)
27 if ((typeof event.cancelBubble) != "undefined")
28 event.cancelBubble=true;
30 if ((typeof event.preventDefault) != "undefined")
31 event.preventDefault();
33 if ((typeof event.returnValue) != "undefined")
34 event.returnValue = false;
36 if ((typeof event.stopPropagation) != "undefined")
37 event.stopPropagation();
39 return false;
42 return true;
45 </script>
47 <body oncontextmenu="return context_event(event)">
48 <div>To activate context menu, right-click or ctrl-click anywhere on the page.</div>
49 <div>&nbsp;</div>
50 <div><input type="checkbox" value="1" name="swallow_context" id="swallow_context"> Prevent default context menu</div>
51 <div>&nbsp;</div>
52 <tt id="event_info" style='background-color:#eeeeee'>
53 -- No event captured --
54 </tt>
55 </body>
56 </html>