Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

267
Views
in wix, how do you pass a functions as a arguments to the backend

I'm in wix and I'm trying to pass a function as a call back to a function that came from a backend and call it in my b

import {testCB} from "backend_filename.jsw"

testCB(d=>{
    console.log("inside testCB");
    console.log(d);
},123);

function in backend

export function testCB(cb, arg){
  console.log("inside testCB:");
  console.log(cb); console.log(arg);
  cb(1,arg);
}

The output of the log shows that cb is null but the arg parameter's value passes through as 123. How do I pass a function as an argument through a function I imported from the backend?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!