Navaron Bracke

remove redundant cleanup code

@@ -339,24 +339,5 @@ class MobileScannerWeb extends MobileScannerPlatform { @@ -339,24 +339,5 @@ class MobileScannerWeb extends MobileScannerPlatform {
339 await stop(); 339 await stop();
340 await _barcodesController.close(); 340 await _barcodesController.close();
341 await _settingsController.close(); 341 await _settingsController.close();
342 -  
343 - // Finally, remove the video element from the DOM.  
344 - try {  
345 - final HTMLCollection? divChildren = _divElement?.children;  
346 -  
347 - // Since the exact element is unknown, remove all children.  
348 - // In practice, there should only be one child, the single video element.  
349 - if (divChildren != null && divChildren.length > 0) {  
350 - for (int i = 0; i < divChildren.length; i++) {  
351 - final Node? child = divChildren.item(i);  
352 -  
353 - if (child != null) {  
354 - _divElement?.removeChild(child);  
355 - }  
356 - }  
357 - }  
358 - } catch (_) {  
359 - // The video element was no longer a child of the container element.  
360 - }  
361 } 342 }
362 } 343 }