Skip to content
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

adding example for createObjectURL #1568

Closed
wants to merge 4 commits into from
Closed

Conversation

thisisjofrank
Copy link
Collaborator

@thisisjofrank thisisjofrank commented Mar 17, 2025

Makes a cute little demo
image

@thisisjofrank thisisjofrank marked this pull request as ready for review March 17, 2025 11:22
@thisisjofrank thisisjofrank changed the title adding exmaple for createObjectURL adding example for createObjectURL Mar 17, 2025
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think an example should show usage in deno, not client side

This is a pretty niche API mostly here for compatibility reasons, I'm not sure it warrants an example. The one place I've seen it is when creating a Web Worker and wanting to define the worker's source code in the same file, you can use URL.createObjectURL to pass to the worker constructor - example here
I'd just drop that example into the JSDoc and probably leave out the full example page, since its uncommonly used.

@@ -0,0 +1,185 @@
/**
* @title Create Object URL
Copy link
Member

@ry ry Mar 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL.createObjectURL

* @title Create Object URL
* @difficulty beginner
* @tags web
* @run -allow-net
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--allow-net

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants