fengari-lua / fengari-interop

Fengari <=> JS Interop
MIT License
97 stars 13 forks source link

jQuery and Fengari - not playing nice #46

Closed mfrederico closed 5 years ago

mfrederico commented 5 years ago

I'm having some mental fengari -> js // js -> fengari corroboration issues: in my browser console: fengari.load('js=require("js"); local jq=js.global.jQuery; print(jq:find(\'body\'):html())')();

Gives me: fengari-web.js:8 Uncaught [string "?"]:1: attempt to call a nil value (method 'html')

I'm not sure why?

daurnimator commented 5 years ago

It's like you ran the JS code: jQuery.find("body").html()

daurnimator commented 5 years ago

I'm going to close this assuming the above answer was what you needed.