Add fallback for webkit specific js.

[#52671347]
Include matchSelector method in generated js.

This fixes the Chrome test suite regression introduced by 8680be768a

[Finishes #52671347]