Example: YepNope

<script>
yepnope({
  test : !!window.Intent,
  nope : ['http://webintents.org/webintents.min.js'],
  complete:  function() {
    var startButton = document.getElementById("startActivity");
    startButton.addEventListener("click", function() {
      var intent = new Intent(
          "http://webintents.org/share", "*");

      window.navigator.startActivity(intent);
    }, false);
  }
});
</script>