Strophe.js is a JavaScript library for speaking XMPP via BOSH (XEP 124 and 206) or Websocket protocol (as per RFC 7395).
Its primary purpose is to enable web-based, real-time XMPP applications that run in any web browser.
It supports extension via a plugin system. There is a collection of Strophe.js plugins created and maintained by the community.