scramjet / src /client /dom /beacon.ts
soiz1's picture
Upload 150 files
bee6636 verified
raw
history blame contribute delete
308 Bytes
import { rewriteUrl } from "../../shared/rewriters/url";
import { ScramjetClient } from "../client";
export default function (client: ScramjetClient, _self: Self) {
client.Proxy("Navigator.prototype.sendBeacon", {
apply(ctx) {
ctx.args[0] = rewriteUrl(ctx.args[0], client.meta);
},
});
}