I'm following a tutorial to create a HTML5 contextmenu, and have so far got the following lines of code in my website:
<a id="logo" href="http://mywebsite.com" contextmenu="download-logo">
<img class="default-logo" alt="My Website" src="http://mywebsite.com/logox2-standard.png" />
<img class="retina-logo" alt="My Website" src="http://mywebsite.com/logox2-retina.png" />
<menu type="context" id="download-logo">
<menu label="Looking For Our Logo?">
<menuitem label="Download High Resolution (45KB)" icon="http://www.mywebsite.com/logo-icon.jpg" onClick="window.location.href='http://www.mywebsite.com/logo-retina.zip'"></menuitem>
<menuitem label="Download Low Resolution (20KB)" icon="http://www.mywebsite.com/logo-icon.jpg" onClick="window.location.href='http://www.mywebsite.com/logo-standard.zip'"></menuitem>
</menu>
</menu>
</a>
This works perfectly fine when viewing the website in Mozilla Firefox, which is currently the only browser that supports it:
HTML contextmenu Attribute (W3Schools).
However, there is a polyfill available that will add additional support in other web browsers:
How do I apply this polyfill to my current code above, once I've included the JavaScript file in to the <head> tag of my website?
Please keep in mind I'm not very familiar with JavaScript.
Thank you.