Turns out there's no good public API from Webkit that can let us do that easily.
We're working on an alternative here https://bugzilla.mozilla.org/show_bug.cgi?id=1164067
We're working on an alternative here https://bugzilla.mozilla.org/show_bug.cgi?id=1164067