mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 15:30:00 -04:00
fix location.href
This commit is contained in:
parent
5790cfc1fb
commit
70e0a684ae
1 changed files with 6 additions and 0 deletions
|
@ -43,6 +43,12 @@ export function createLocationProxy(
|
||||||
if (native.set) {
|
if (native.set) {
|
||||||
desc.set = new Proxy(native.set, {
|
desc.set = new Proxy(native.set, {
|
||||||
apply(target, thisArg, args) {
|
apply(target, thisArg, args) {
|
||||||
|
if (prop === "href") {
|
||||||
|
// special case
|
||||||
|
client.url = args[0];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let url = new URL(client.url.href);
|
let url = new URL(client.url.href);
|
||||||
url[prop] = args[0];
|
url[prop] = args[0];
|
||||||
client.url = url;
|
client.url = url;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue