How to detect mouseup event in a blend4web sensor manifold
Thankfully there is a simpler solution. The mouse click sensor passes a 1 to the manifold's logic function on mousedown event and a 0 value, when the mouse button is not pressed. So we write a logic function which returns its value inside a CT_CONTINUOUS type manifold, which according to the documentation behaves like this:


  Manifold control type: continuous. Such manifold executes the callback
  with a positive pulse (+1) each frame when the result of evaluation of
  its logic function is non-zero. It executes a callback with a negative
  pulse (-1) once the logic function evaluates to zero.


So your callback function will have the 1 pulse on every frame when the mouse is down and the pulse -1 on the first frame after the mouse button is released. 

function registerMouse() {
  console.log("mouse registered");
  var clickSensor = m_ctl.create_mouse_click_sensor();

  function logic(triggers) {
   if (triggers[0])
    return 1;
   else
    return 0;
  }

  function cb(obj, id, pulse, param) {
   console.log(pulse);
   return;
  };

  m_ctl.create_sensor_manifold(null,
                               "mouse",
                               m_ctl.CT_CONTINUOUS,
                               [clickSensor],
                               logic,
                               cb,
                               );
 }


Notes 

In this simple example it would be sufficient to use the default logic function (pass null instead of a function), however you should definitely use this scaffolding, when you have multiple sensors in your manifold. 

You can also use CT_TRIGGER type manifold