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

how to set crossorigin to avatar component's image dom node? #3963

Closed
vaseala opened this issue Oct 28, 2022 · 0 comments
Closed

how to set crossorigin to avatar component's image dom node? #3963

vaseala opened this issue Oct 28, 2022 · 0 comments
Labels
feature request New feature or request

Comments

@vaseala
Copy link

vaseala commented Oct 28, 2022

This function solves the problem (这个功能解决的问题)

to use SharedArrayBuffer, I have to set the server header: Cross-Origin-Opener-Policy: same-origin.
(https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer)

If the n-avatar component's image is not the same site with current href, it can not show normal.(Maybe other components had the same problem.)

If I can add a crossorigin="anonymous" attribute to the <img />, It can show normal.

Expected API (期望的 API)

<n-avatar
    ...
    src="otherdomain/somepath.png"
    crossorigin="anonymous"
>
</n-avatar>

Then the crossorigin="anonymous" can pass to the <img /> node in the avatar component.

@github-actions github-actions bot added the feature request New feature or request label Oct 28, 2022
@vaseala vaseala changed the title how to set crossorigin to avatar component's image node? how to set crossorigin to avatar component's image dom node? Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant