refactor: delete codecs/ & self.$scramjet

This commit is contained in:
velzie 2024-10-13 10:20:19 -04:00
parent f8d33a207e
commit 337134bcdc
No known key found for this signature in database
GPG key ID: AA51AEFB0A1F3820
22 changed files with 148 additions and 206 deletions

View file

@ -5,7 +5,7 @@ import { rewriteUrl } from "../../shared/rewriters/url";
export default function (client: ScramjetClient, self: Self) {
const Function = client.natives.Function;
self[config.importfn] = function (base: string) {
self[config.globals.importfn] = function (base: string) {
return function (url: string) {
const resolved = new URL(url, base).href;
@ -15,7 +15,7 @@ export default function (client: ScramjetClient, self: Self) {
};
};
self[config.metafn] = function (base: string) {
self[config.globals.metafn] = function (base: string) {
return {
url: base,
resolve: function (url: string) {