Justin Meltzer
Justin Meltzer

Reputation: 13558

Get a textNode as a childNode in IE8

I have a reference to a style HTML tag with styling text inside of it. I'm trying to access this textNode through the childNodes property but it only returns an empty object. How can you access textNodes from their parent in IE8?

Upvotes: 2

Views: 424

Answers (1)

Sampson
Sampson

Reputation: 268444

The text within the tags doesn't appear to be represented as a childNode in IE8. You can, however, access it as .innerHTML which returns all of the rules as plain text.

Fiddle: http://jsfiddle.net/jonathansampson/F2Wcg/

Upvotes: 1

Related Questions