Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
  <title>Override _focusableNodes</title>
  
  <base href="https://polygit.org/components/">
  
  <script src="webcomponentsjs/webcomponents-lite.js"></script>
  <link rel="import" href="iron-overlay-behavior/iron-overlay-behavior.html">
</head>
<body>
  
  <dom-module id="my-overlay">
    <template>
      <style>
         :host {
          display: inline-block;
          border: 1px solid lightgray;
          padding: 10px;
          background-color: white;
        } 
      </style>
      <p>Confirm your action?</p>
      <button id="lastFocusable">No</button>
      <button id="firstFocusable" tabindex="1">Yes, confirm!</button>
    </template>
    <script>
      // NOTE: not needed if we declare this element in a separate file and import it.
      addEventListener('WebComponentsReady', function() {
        Polymer({
          is: 'my-overlay',
          behaviors: [
            Polymer.IronOverlayBehavior
          ],
          get _focusableNodes() {
            return [
              this.$.firstFocusable,
              this.$.lastFocusable
            ];
          }
        });
      });
    </script>
  </dom-module>
  <my-overlay opened with-backdrop></my-overlay>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
valdrinkoshipro
0viewers