Created
October 30, 2023 17:51
-
-
Save Vitzkrieg/b008f34ef86d946848869c3a316b429b to your computer and use it in GitHub Desktop.
Get Element's Before Content
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const el = document.getElementById('id'); | |
const beforeText = getComputedStyle(el, ':before').getPropertyValue('content'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment