This example shows the usage of Turf.js to compute the intersection of polygons.
Once the vector layer shows up, you can draw a polygon on the map. Within a small amount of time, you should see the result of intersection highlighted in blue.
Link to demo