We do not have any XDK-specific sample on how to utilize RealSense in a Cordova app. Doing so would require a Cordova plugin to get to the low-level RealSense software and hardware. I do not believe any such Cordova plugins have been written (at least, none have been written by Intel that I am aware of).
There has been some work done to incorporate RealSense into Crosswalk for Windows, but we do not support that in the XDK and I do not know what the status of that work is. Your best bet, at this time, if you want to build an HTML5 app that utilizes RealSense would be to check with the Crosswalk for Windows project to see if they are delivering anything that you could use. If they are, you'll have to use their build tools to create the app, since the XDK does not support building Crosswalk for Windows apps.