title: How to request fullscreen in compiled dart
body: <p>I'm playing around with a Dart app trying to get fullscreen mode to work. My HTML (excluding boilerplate):</p>
  
  <pre><code>&lt;div id="fullscreen_div"&gt;
    Clicking this should cause it to go fullscreen!
  &lt;/div&gt;
  </code></pre>
  
  <p>My Dart code:</p>
  
  <pre><code>import 'dart:html';
  
  void main() {
    var div = querySelector('#fullscreen_div');
    div.onClick.listen((MouseEvent e) {
      div.requestFullscreen();
      print('requested fullscreen');
    });
  }
  </code></pre>
  
  <p><a href="https://dartpad.dartlang.org/3c0b9b112b5e8d79214a" rel="nofollow">Here it is on DartPad.</a></p>
  
  <p>If I've done this correctly, clicking the div once should cause the div to go into fullscreen mode. On Chromium, this works. When compiled to JavaScript (both debug and minified), this does not happen, and the console outputs:</p>
  
  <pre><code>Uncaught TypeError: undefined is not a function
  </code></pre>
  
  <p>This happens on both Chrome, Firefox and IE (tested on Windows 7). From what I've understood this is a common JavaScript error, and searching does not bring up anything obvious. </p>
  
  <p>Any ideas why <code>requestFullScreen</code> won't work when dart is compiled to JS?</p>