javascriptcore Questions

7

Solved

I'm trying to use number formatter of Intl, which works perfectly on iOS and when debugger is attached to either iOS or Android, but only fails on Android without debugger attached due to outdated ...

8

Looking for a way to parse a URL to get a query variable in React Native received from Linking. I'm receiving the URL as something like: url-app-scheme://somePage?someVar=someVal I'd like to get...
Icecold asked 18/5, 2017 at 3:38

2

Solved

I'm executing a JavaScript SDK from within a JSContext, I can't get values out of any of the SDK's asynchronous functions however. I can get a JavaScript promise out of the JSContext, but I can't f...
Blastoderm asked 12/9, 2017 at 16:53

2

This is not a question, but I'm posting here in the hope that it will save someone else's sanity (I've just spent the best part of a day figuring this one out). I've identified a memory leak that h...

2

Solved

I'm trying to load and execute a WebAssembly .wasm from within a Swift-based, iOS app. I first attempted to use the JavaScriptCore Framework but the WebAssembly.* module wasn't available in the Con...
Achromatism asked 4/8, 2019 at 17:32

0

I have a Rust library that exposes a C-callable FFI. I want to be able to use it in React Native by building a Native Module for Android. I'm looking into jnr-ffi for building the native module, bu...
Gilmore asked 26/6, 2020 at 6:44

3

It's possible to use by default V8 instead of JavascriptCore when the app is not in debug mode? I found some issues in JavascriptCore and not in V8 and is annoying switching 😓 Thanks.
Plexor asked 24/6, 2017 at 10:16

2

Solved

It seems the exception stacktrace in iOS only contains the method name or there is a bug. Below is my code of handling exceptions in JSContext. context.exceptionHandler = { (ctx: JSContext!, value:...
Immortalize asked 14/12, 2015 at 17:55

3

I'm developing an iOS 7 app that has scripting capabilities using JavascriptCore. I'd like to have a way to pause or completely stop the code currently running on the JSContext. JavascriptCore isn...
Sojourn asked 13/2, 2014 at 9:58

1

Solved

I need to stop the execution of Javascript in a JSContext object? I found the following method which exactly what I need @function @abstract Sets the script execution time limit. @param group The ...
Nova asked 24/9, 2016 at 11:40

2

I have an application that extends JavaScript via JavaScriptCore, in a webkit-gtk browser. Right now I have several classes that I add to the global context like so: void create_js(gpointer contex...

4

Solved

Not sure if I hit a bug in WebKit or I am doing something horribly wrong, but I can't figure out how to use WKScriptMessageHandler without causing whatever value contained in WKScriptMessage.body t...
Ulda asked 27/6, 2015 at 22:20

3

Solved

I'm trying to use Swift's JavaScriptCore framework to take advantage of an existing JavaScript library that uses ES6 modules. Specifically, morse-pro by Stephen C Phillips. I've added the files to ...
Chenee asked 20/1, 2018 at 10:4

0

We have an iOS app with a UIWebView that loads YouTube iframe player to play youtube videos. After iOS 11.3 released we found that there are a lot of javascript core crashes. On Fabric crashlytics ...

1

Solved

I am trying to bundle together several javascript files using RollUp.js but when I do, the classes that aren't used get removed. This process is called tree shaking and I want to disable it. I hav...
Possessive asked 20/8, 2017 at 18:10

2

Solved

We are developing a Cocoa app for Mac OSX (10.8) which needs to use a JavaScript library (long story why we must use JavaScript). In a demo application everything seemed to be just fine, but while...
Tenuis asked 29/7, 2013 at 10:27

2

Solved

In UIWebView, I can get JSContext through: [webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"] The same way doesn't work in WKWebView and app crashes when it arrives th...
Unyielding asked 11/9, 2014 at 16:0

0

I work on a framework that creates multiple JSContexts. I have confirmed they are being deallocated by overriding the ‘dealloc’ method in the class that maintains a reference to them. I’ve also pro...
Jerrilyn asked 1/12, 2016 at 20:20

1

I have a Swift object that I'm exposing to JavaScriptCore like this: @objc(MyObjectExport) protocol MyObjectExport:JSExport { var name:String {get set} var dict:[String:String] {get set} } clas...
Patrinapatriot asked 25/6, 2015 at 12:19

6

Solved

I am using JavaScriptCore library inside iOS application and I am trying to implement setTimeout function. setTimeout(func, period) After application is launched, the JSC engine with global cont...
Whittier asked 13/4, 2013 at 17:58

4

Solved

I've been experimenting with the new Objective C JavascriptCore Framework. This is crazy, but it seems that it doesn't have setTimeout or setInterval. Which... I don't understand. Am I right abo...
Forth asked 13/1, 2014 at 19:55

2

Solved

I am writing an iOS App (using xcode 7.3 and swift 2.2) using JavascriptCode framework. Calling javascript methods from swift works perfect, but when I call the swift method from javascript, xcode ...
Saltish asked 19/6, 2016 at 14:4

0

I'm currently trying to debug crashes in a JavascriptCore implementation of an interface for native code to perform some work on behalf of the javascript code in the WebView. The crash sometimes o...
Dispatch asked 15/7, 2016 at 16:32

1

Solved

Is there any way to force iOS (or Mac OS) JavaScriptCore VM garbage collector to run? I need it only to test for memory leaks, so private API would be fine.
Hyperon asked 28/2, 2016 at 23:13

1

Solved

We are building a React Native application on Android. We have a requirement of creating a separate JSC virtual machine instance in a thread. We do not want to use same JSC context which is used by...
Scintilla asked 3/3, 2016 at 9:21

© 2022 - 2024 — McMap. All rights reserved.