forked from saucelabs/the-internet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed /context_menu to fire a JS alert on a context click. Fixes sa…
- Loading branch information
David Haeffner
committed
Jun 8, 2019
1 parent
4ac7d2e
commit 8772ecc
Showing
1 changed file
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<menu type="context" id="menu"> | ||
<menuitem label="the-internet" onclick="window.alert('You selected a context menu')"></menuitem> | ||
</menu> | ||
<div class="example"> | ||
<h3>Context Menu</h3> | ||
<p>Context menu items are custom additions that appear in the right-click menu.</p> | ||
<p>Right-click in the box below to see one called 'the-internet'. When you click it, it will trigger a JavaScript alert.</p> | ||
<div id='hot-spot' style="border-style: dashed; border-width: 5px; width: 250px; height: 150px;" contextmenu="menu"> | ||
<div id='hot-spot' style="border-style: dashed; border-width: 5px; width: 250px; height: 150px;" oncontextmenu="displayMessage()"> | ||
</div> | ||
</div> | ||
|
||
</br></br> | ||
<strong>NOTE: This functionality currently only works on Firefox. See <a href="https://github.com/tourdedave/the-internet/issues/12">this open issue</a> for details.</strong> | ||
|
||
<script> | ||
function displayMessage() { | ||
window.alert('You selected a context menu') | ||
} | ||
</script> |