# Documented JS example for Studio::System::setListenerAttributes does not match current bindings

**URL:** <https://qa.fmod.com/t/documented-js-example-for-studio-setlistenerattributes-does-not-match-current-bindings/20455>\
**Category:** FMOD Studio\
**Tags:** html5\
**Created:** [July 23, 2023, 9:05pm UTC](https://qa.fmod.com/t/documented-js-example-for-studio-setlistenerattributes-does-not-match-current-bindings/20455 "2023-07-23T21:05:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![msub2](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/msub2/32/5305_2.png) [@msub2](https://qa.fmod.com/u/msub2)\
**Post date:** [July 23, 2023, 9:05pm UTC](https://qa.fmod.com/t/documented-js-example-for-studio-setlistenerattributes-does-not-match-current-bindings/20455/1 "2023-07-23T21:05:11Z")

</div>

Currently experimenting with integrating FMOD into a WebXR experience, but I’m hitting a roadblock when trying to update the listener attributes. According to the documentation, all I should need to call this from JavaScript is the listener ID and then the attributes, which I am doing currently

```auto
function update(listenerAttributes) {
  gSystem.setListenerAttributes(0, listenerAttributes);
  CHECK_RESULT(gSystem.update());
}

```

But when I try to run this, I get an emscripten binding error saying that this function expects 3 arguments, not 2.  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/1/1f209067239b8b450c86ce6fd46b803824773ca0.png)

If I look into the Chrome debug tools I can see the types expected for each argument are (int, emscripten::val, emscripten::val). I also notice on [the page for FMOD\_3D\_ATTRIBUTES](https://documentation.help/FMOD-API/FMOD_3D_ATTRIBUTES.html) there is a vague disclaimer for JavaScript that reads “Not all fields are currently supported or may not work as expected at this time.” I’m unsure if that’s related though (and it would help to know specifically what part of it is actually supported/not supported or doesn’t work as expected).

UPDATE: It seems if I just pass `0` as the third argument it begins working without any noticeable issue. Regardless, I’d still like to know exactly what it’s expecting there.

---

<div class="post-metadata">

**Author:** ![msub2](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/msub2/32/5305_2.png) [@msub2](https://qa.fmod.com/u/msub2)\
**Post date:** [July 23, 2023, 11:40pm UTC](https://qa.fmod.com/t/documented-js-example-for-studio-setlistenerattributes-does-not-match-current-bindings/20455/2 "2023-07-23T23:40:42Z")

</div>

Okay, I realize now what happened and it’s completely my fault: I was looking at the documentation on a non-official source ([https://documentation.help](https://documentation.help)) when the on-site docs actually do give me the information I was looking for 🤦‍♂️
