I have some HTML code in that between style tag I will write some styles with classes. When added event listener with text it is not selecting the text
To Reproduce
parser.addListener('tagstart', function (event) {
if (event.tagName.toLowerCase() === 'style') {
insideStyleTag = true
}
})
parser.addListener('tagend', function (event) {
if (event.tagName.toLowerCase() === 'style') {
insideStyleTag = false
}
})
parser.addListener('text', function (event) {
if (insideStyleTag) {
console.log('event', event)
const cssText = event.raw
const cssClassRegex = /\.([\w-]+)/g
let match
while ((match = cssClassRegex.exec(cssText)) !== null) {
classNames.add(match[1])
}
}
})
I am expecting the content to be available at text listener
I have some HTML code in that between style tag I will write some styles with classes. When added event listener with text it is not selecting the text
To Reproduce
I am expecting the content to be available at text listener