Skip to content

Commit

Permalink
Enable no-empty-functions and prevent empty functions, see: phetsims/…
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed Jun 17, 2022
1 parent a7e7d71 commit 0ea5601
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions html/patient-snapshotter.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<body>
<script src="../../query-string-machine/js/QueryStringMachine.js"></script>
<script src="../../sherpa/lib/jshashes-1.0.7.min.js"></script>
<script src="../../sherpa/lib/lodash-4.17.4.min.js"></script>
<script type="module" src="../../chipper/dist/js/aqua/js/patient-snapshotter.js"></script>
</body>
</html>
6 changes: 3 additions & 3 deletions js/patient-snapshotter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ window.addEventListener( 'message', evt => {
// Don't allow popups
iframe.contentWindow.open = function() {
return {
focus: function() {},
blur: function() {}
focus: _.noop,
blur: _.noop
};
};
// FileSaver don't allow popup
iframe.contentWindow.saveAs = function() {};
iframe.contentWindow.saveAs = _.noop;

// We need to create an object with the iframe's Object.prototype as its prototype to pass our assertion checks
const contentOptions = iframe.contentWindow.Object.create( iframe.contentWindow.Object.prototype, {
Expand Down

0 comments on commit 0ea5601

Please sign in to comment.