Skip to content

Commit

Permalink
Remove unused iframe attributes
Browse files Browse the repository at this point in the history
 - Remove `seamless` attribute which has not been supported by major
   browsers for years [1]
 - Remove the `name="hyp_sidebar_frame"` attribute which is not
   referenced anywhere else in the code. I did find a couple of
   references to it in Google, but only in scripts written by Hypothesis
   team members which are not run regularly.

[1] https://caniuse.com/iframe-seamless
  • Loading branch information
robertknight committed Oct 22, 2020
1 parent f2d50ed commit 25d3aa4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/annotator/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,10 @@ function createSidebarIframe(config) {
const sidebarAppSrc = config.sidebarAppUrl + '#' + configParam;

const sidebarFrame = document.createElement('iframe');
sidebarFrame.setAttribute('name', 'hyp_sidebar_frame');

// Enable media in annotations to be shown fullscreen
sidebarFrame.setAttribute('allowfullscreen', '');

sidebarFrame.setAttribute('seamless', '');
sidebarFrame.src = sidebarAppSrc;
sidebarFrame.title = 'Hypothesis annotation viewer';
sidebarFrame.className = 'h-sidebar-iframe';
Expand Down

0 comments on commit 25d3aa4

Please sign in to comment.