I am not sure why you are asking specifically for a WebSocket solution because the XMPP servers would have to support this first.
However there are several XMPP JavaScript libraries available (as far as I see they all use the BOSH method):
- Dojo toolkit has an XMPP extension library
- JS.io
- JSJac
- Strophe.js
- xmpp4js
- Z-XMPP
These examples were taken from the XMPP Website which lists open source implementations of the XMPP protocol.