   private var bannerImgPath: String = ""
 
   var isLoading: Bool = false
+
+  private var currentText: String = ""
+  private var currentCursorRange: NSRange? = nil
 
   init(storage: Storage) {
     self.storage = storage

    text = text.replacingOccurrences(of: "\\", with: "\\\\")
    text = text.replacingOccurrences(of: "'", with: "\\'")
    text = text.replacingOccurrences(of: "\n", with: "\\n")
    webView!.evaluateJavaScript("setKeymanVal('\(text)');", completionHandler: nil)
  }
  

    log.info("Loaded keyboard.")

    resizeKeyboard()

    // There may have been attempts to set these values before the keyboard loaded!
    self.setText(self.currentText)
    if let cursorRange = self.currentCursorRange {
      self.setCursorRange(cursorRange)
    }
    
    setDeviceType(UIDevice.current.userInterfaceIdiom)
    
    let shouldReloadKeyboard = Manager.shared.shouldReloadKeyboard
