-
Notifications
You must be signed in to change notification settings - Fork 270
Use ada-url for URL operations in web APIs #1170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Also add ada-url bindings.
This still doesn't use `state` since `state` doesn't allow us to iterate the nodes when releasing the memory and we need to call `URL.destructor` when freeing. In the future, we might omit getter allocations by making such change.
return parser.anchorSetHref(self, href); | ||
} | ||
|
||
// TODO return a disposable string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using the call_arena
fixes this comment.
// TODO return a disposable string |
return parser.anchorSetHref(self, href); | ||
} | ||
|
||
// TODO return a disposable string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using the call_arena fixes this comment.
// TODO return a disposable string |
return parser.anchorSetHref(self, href); | ||
} | ||
|
||
// TODO return a disposable string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO return a disposable string |
return error.NotProvided; | ||
} | ||
|
||
// TODO return a disposable string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO return a disposable string |
return u.get_origin(page); | ||
} | ||
|
||
// TODO return a disposable string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO return a disposable string |
return parser.anchorSetHref(self, href); | ||
} | ||
|
||
// TODO return a disposable string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO return a disposable string |
return parser.anchorSetHref(self, href); | ||
} | ||
|
||
// TODO return a disposable string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// TODO return a disposable string |
</script> | ||
|
||
<script id=invalidUrl> | ||
let u = new URL("://foo.bar/path?query#fragment"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about testing if the error is thrown instead?
const SetterError = error{Internal}; | ||
|
||
return try std.mem.concat(arena, u8, &[_][]const u8{ "#", uriComponentNullStr(self.uri.fragment) }); | ||
// FIXME: reinit search_params? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sounds like we should reset and parse search params too indeed.
This PR moves #1127's web API changes to this PR. We can swap-in to ada-url in CDP and close the initial PR once that become a necessity.
URL
.HTMLAnchorElement
.Closes #1111.