1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 22:34:59 +00:00
serenity/Base/home/anon/js/native-function.js
Andreas Kling 7912f33ea0 LibJS: Add NativeFunction, a callable wrapper around a C++ lambda
This can be used to implement arbitrary functionality, callable from
JavaScript.

To make this work, I had to change the way CallExpression passes
arguments to the callee. Instead of a HashMap<String, Value>, we now
pass an ordered list of Argument { String name; Value value; }.

This patch includes a native "print(argument)" function. :^)
2020-03-12 19:54:47 +01:00

1 line
24 B
JavaScript