Skip to main content

Questions tagged [javascriptcore]

JavaScriptCore is a framework that provides a JavaScript engine for WebKit implementations, and provides this type of scripting in other contexts within Mac OS X and iOS.

javascriptcore
1 vote
1 answer
43 views

How to correctly embed JavaSciptCore into Linux application?

I'm trying to embed JavaScriptCore library for JS execution into Linux application and I have a problem. The library emits signal SIGUSR1 during the script execution. Shouldn't it be handled by the ...
phoenix76's user avatar
1 vote
0 answers
46 views

JavaScriptCore crash during JSObjectCallAsFunction on IOS 13 IOS14 AND IOS 17

The entry function calls of the crash stack are all JSObjectCallAsFunction, but the subsequent crash location is different on each system. We have suspected a memory problem, but the device still has ...
冯浩臻's user avatar
1 vote
0 answers
49 views

Use JSValue.toObjectOf for typed arrays

With JSExport of JavaScriptCore you can convert a JavaScript object to a Swift object. However I cannot find a way how to convert an array of JavaScript objects to a native Swift array. Therefore I ...
ph1psG's user avatar
  • 718
0 votes
0 answers
12 views

How to input multiple lines in WebKit JavaScriptCore shell?

Is there a way for input multiple lines in WebKit JavaScriptCore shell? For example, I want to type a function declaration that has multiple lines. When I just copy and paste the function, the ...
maplgebra's user avatar
  • 123
1 vote
0 answers
33 views

Javascript: webpack bundle not exporting expected function

I am trying to bundle the Javascript library cookpete/poker-odds so I can use it in Swift JavascriptCore. When I bundle the code with webpack, and then run const bundle = require("./bundle.js&...
user3320795's user avatar
0 votes
2 answers
287 views

What happens with async await exactly?

I have such a piece of code async function loop() { for (let i = 0; i < 3; i++) { console.log(i,new Error("").stack); await 1; } } loop(); when I run it in Node (Chrome ...
Łukasz Karczewski's user avatar
1 vote
0 answers
35 views

EAS Android Production Build - Install Crash

I am having a very strange problem and I can’t figure it out. I did an EAS android production build. After I install the apk on my Galaxy device it crashes on initial load. It is almost instant, the ...
Steve Kovacs's user avatar
1 vote
1 answer
306 views

Do JavaScript engines have any specific optimizations for classes? [closed]

I want to document the differences between classes and closures in JavaScript. Both class-based, object-oriented and functional JavaScript exist in the wild. For example in React, both class ...
scottwillmoore's user avatar
0 votes
1 answer
79 views

How to scroll first div overflow then after that body scroll by using JavaScript?

<body> <div class="container" style="overflow-y:scroll, width:100%,height:500px"> <div class="overFlow" style="width:60%,height:"1000px,background-color:red,display;flex,...
Suman kumar's user avatar
0 votes
0 answers
53 views

Instantiate object from browserify-bundled NPM package in JavaScriptCore in Swift

I have bundled up an NPM package using Browserify. Then, I import it into Swift guard let npmPackage = Bundle.main.path(forResource: "mynpmpackage", ofType: "js") else { ...
Julia's user avatar
  • 1,076
4 votes
1 answer
829 views

How to await async JS function inside Swift using JavaScriptCore and Callback

I would like to call an async JS function from within Swift using JavaScriptCore. However, when the JS function is asynchronous, how do I force the Swift function call to wait until the async ...
Julia's user avatar
  • 1,076
0 votes
1 answer
342 views

Is there anyway to check how long microtasks take to execute?

I would like to time a function which will spawn a bunch of microtasks. I would like to time how long the microtasks took to execute and exclude the idle time that the event loop was empty. It's ...
david_adler's user avatar
  • 10.5k
2 votes
0 answers
630 views

Measure javascript thread blocked / idle time in react native?

I am doing some performance tuning in react native. I am timing my expensive function foo() like so. console.time('foo') await foo() console.timeEnd('foo') Suppose foo is storing data into the local ...
david_adler's user avatar
  • 10.5k
1 vote
0 answers
307 views

How can Javascript communicate with C++ in React Native?

In old architecture of React Native, we all know it uses a bridge to connect Javascript and Native language, the data format is json, Javascript communicates with C++, C++ communicates with Native ...
jasonjifly's user avatar
0 votes
0 answers
459 views

How to include the static JavaScriptCore C library(libJavaScriptCore.a)?

I was able to compile JavaScriptCore on Linux and I want to use the JavaScriptCore static library. It is my understanding that in C, .a files are the static libraries and I need a header file,(.h) ...
mrtksn's user avatar
  • 422

15 30 50 per page
1
2 3 4 5
23