mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 23:10:02 -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) {
|
||||
desc.set = new Proxy(native.set, {
|
||||
apply(target, thisArg, args) {
|
||||
if (prop === "href") {
|
||||
// special case
|
||||
client.url = args[0];
|
||||
return;
|
||||
}
|
||||
|
||||
let url = new URL(client.url.href);
|
||||
url[prop] = args[0];
|
||||
client.url = url;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue