mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Micro-optimization
This commit is contained in:
parent
d0c34d2131
commit
dcc0818e81
@ -13,10 +13,9 @@ autoreload_enabled = False
|
||||
AUTO_UPDATE_THRESHOLD = 1000 # millisecs
|
||||
|
||||
|
||||
def iframe_main():
|
||||
script = document.getElementById('bootstrap')
|
||||
if script:
|
||||
def iframe_main(script):
|
||||
script.parentNode.removeChild(script) # free up some memory
|
||||
script = undefined
|
||||
m = ρσ_get_module(window.iframe_entry_point)
|
||||
main = m?.main
|
||||
if main:
|
||||
@ -56,6 +55,6 @@ def toplevel_main():
|
||||
if document?:
|
||||
iframe_script = document.getElementById('bootstrap')
|
||||
if iframe_script:
|
||||
iframe_main()
|
||||
iframe_main(iframe_script)
|
||||
else:
|
||||
toplevel_main()
|
||||
|
Loading…
x
Reference in New Issue
Block a user