Adapt to changed Mojo api.

Hi,

Mojolicious recently (in 5.56 or thereabouts) deprecated the dom api used here which led to this not working anymore. This fixes that.