Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save foriequal0/9e7e3c36f6596fd2561b1ca72b71c2a1 to your computer and use it in GitHub Desktop.
Save foriequal0/9e7e3c36f6596fd2561b1ca72b71c2a1 to your computer and use it in GitHub Desktop.
Google spreadsheet image link context menu
@su-bob
Copy link

su-bob commented Jan 2, 2024

innerHTML 을 직집 입력하는게 막혔네요

const aTag = document.createElement('a');
aTag.href = target.src;
aTag.target = "_blank";
aTag.textContent = "link";
div.appendChild(aTag);

@foriequal0
Copy link
Author

https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy/createHTML
이걸 적용했는데요
음 이건 Firefox 에서 안먹는군요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment