We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See if we there is a better way to deal with JavaScript instead of sending raw strings to the web view. For example using JavaScritpCore:
lazy var context: JSContext? = { let context = JSContext() guard let commonJSPath = Bundle.main.path(forResource: "opensheetmusicdisplay.min", ofType: "js") else { print("Unable to read resource files.") return nil } do { let common = try String(contentsOfFile: commonJSPath, encoding: String.Encoding.utf8) _ = context?.evaluateScript(common) } catch { print("Error while processing script file: \(error)") } return context }() override func viewDidLoad() { super.viewDidLoad() guard let context = context else { print("JSContext not found.") return } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
See if we there is a better way to deal with JavaScript instead of sending raw strings to the web view.
For example using JavaScritpCore:
The text was updated successfully, but these errors were encountered: