Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.
/ konami-code Public archive

Web Component (with Polymer) to listen the Konami Code (↑↑↓↓←→←→BA)

License

Notifications You must be signed in to change notification settings

abdonrd/konami-code

Repository files navigation

Build status Published on webcomponents.org

<konami-code>

Web Component (with Polymer) to listen the Konami Code (↑↑↓↓←→←→BA).

Example:

<konami-code></konami-code>
<p>Type the Konami Code to launch the easter egg.</p>

<script>
  var konamiCode = document.querySelector('konami-code');
  konamiCode.addEventListener('code-completed', function(event) {
    alert('Easter egg!');
  });
</script>

<!--
You also can use the Polymer annotated event listener setup:
<konami-code on-code-completed="_launchEasterEgg"></konami-code>
-->

About

Web Component (with Polymer) to listen the Konami Code (↑↑↓↓←→←→BA)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages