Skip to content

Commit

Permalink
Remove caching of nodes in local variables with the same name as the …
Browse files Browse the repository at this point in the history
…node id which throws a ReferenceError in the stock android browser with use strict (https://pr.gg/androidStockBrowserUseStrictBug.html)
  • Loading branch information
progers committed Mar 4, 2016
1 parent a759ad1 commit c845568
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// Business logic for base64 encoder (index.html).
// Requires asyncToBase64 and asyncFromBase64 from base64.js

// Cached DOM lookups, initialized in DOMContentLoaded.
var leftImageArea, leftTextarea, leftImageInput, leftTypeSelect, leftTypeText;
var rightTextarea, rightTypeSelect, rightTypeText;

// Initialization of these conversion type constants and locals is done in DOMContentLoaded.
var LeftConversionTypes, RightConversionTypes;

Expand Down Expand Up @@ -35,15 +31,6 @@ window.addEventListener('DOMContentLoaded', function() {
leftConversionType = LeftConversionTypes[Object.keys(LeftConversionTypes)[0]];
rightConversionType = RightConversionTypes[Object.keys(RightConversionTypes)[0]];

leftImageArea = document.getElementById('leftImageArea');
leftTextarea = document.getElementById('leftTextarea');
leftImageInput = document.getElementById('leftImageInput');
leftTypeSelect = document.getElementById('leftTypeSelect');
leftTypeText = document.getElementById('leftTypeText');
rightTextarea = document.getElementById('rightTextarea');
rightTypeSelect = document.getElementById('rightTypeSelect');
rightTypeText = document.getElementById('rightTypeText');

leftTextarea.addEventListener('input', function() {
userLastChangedRightSide = false;
updateConversion();
Expand Down Expand Up @@ -86,7 +73,6 @@ window.addEventListener('DOMContentLoaded', function() {

// Drag and drop support.
var insideCount = 0;
var leftContent = document.getElementById('leftContent');
leftContent.addEventListener('dragenter', function(event) {
insideCount++;
leftTextarea.classList.add('dragover');
Expand Down

0 comments on commit c845568

Please sign in to comment.