js negotiation