quickjspp
quickjspp copied to clipboard
QuickJS C++ wrapper
Is it possible to set a member of std::vector in qjs? Currently only you can only write the full vector. Test case: ```c++ template class Vector { public: std::vector pos;...
This changes the way pointers are stored in JS objects. | | v1 (branch master) | v2 (branch sharedptr) | |--|--|--| |js object holds opaque pointer to|`std::shared_ptr`|`T`| |`std::shared_ptr` conversion|yes|no| |`qjs::shared_ptr`...
Hi FTK, I understand that this error is indicating something else is wrong somewhere. I seem to get errors like this for any getters that return a `DisplayObject*`, so I'm...
First off I'm not sure if this is a quickjshpp bug or a quickjs bug. If I can I'll try test in quickjs too but time is limited right now....
Hi ftk, What is your suggested method of handling an enum class? ```` // c++ enum class DisplayMode { Cover, Contain, LetterBox, }; // js myObject.displayMode = DisplayMode.Contain; ```` Should...
I have a function written in JavaScript. I have created a callback in C++ as following: ``` void callbackFunction( int val ) { try { auto cb = (std::function) context.eval("run");...
Hi FTK. Any chance of an updated MSVC branch? :) i.e. quickjspp.hpp to latest (and other files), and quickjs patches applied? Relates to #23
Can someone solve this problem? thanks ``` SINEPAN-MB0:build sine$ cmake .. CMake Error at CMakeLists.txt:17 (set_target_properties): INTERFACE_LIBRARY targets may only have whitelisted properties. The property "PUBLIC_HEADER" is not allowed. --...
I'm not sure how to use a static JS class method (containing the `this` keyword) in C++ in a way that allows for passing arbitrary parameters from C++. I have...
Hi, I have two files, test_a.js and test_b.js. Here they are: test_a.js ```js var test_object = { foo: "test_a.js", } function func_a(obj) { if ("foo" in obj) { System.print(obj.foo); }...