scramjet / src /client /dom /origin.ts
soiz1's picture
Upload 150 files
bee6636 verified
raw
history blame contribute delete
660 Bytes
import { ScramjetClient } from "../client";
export default function (client: ScramjetClient, _self: Self) {
client.Trap("origin", {
get() {
// this isn't right!!
return client.url.origin;
},
set() {
return false;
},
});
client.Trap("Document.prototype.URL", {
get() {
return client.url.href;
},
set() {
return false;
},
});
client.Trap("Document.prototype.documentURI", {
get() {
return client.url.href;
},
set() {
return false;
},
});
client.Trap("Document.prototype.domain", {
get() {
return client.url.hostname;
},
set() {
return false;
},
});
}