summaryrefslogtreecommitdiffstats
path: root/content/test/data/browser_plugin_focus.html
blob: 697213ac3c74e60cf041d9b090000a77fdfe0730 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html>
<head>
<script type="text/javascript">
  function SetSrc(src) {
    plugin = document.getElementById('plugin');
    plugin.src = src;
  }
</script>
</head>

<body>
  <button id="before" tabindex="0">Before</button>
  <object id="plugin"
      tabindex="0"
      type="application/browser-plugin"
      width="640"
      height="480"
      border="0px"></object>
  <button id="after" tabindex="0">After</button>
<script type="text/javascript">
var plugin = document.getElementById('plugin');
plugin.addEventListener('-internal-instanceid-allocated', function(e) {
  var detail = e.detail ? JSON.parse(e.detail) : {};
  plugin['-internal-attach'](detail.windowId, {});
});
</script>
</body>
</html>