Side navigation
#7073 closed bug (wontfix)
Opened September 23, 2010 11:14PM UTC
Closed October 03, 2010 02:15AM UTC
The .text() function doesn't return contents of a non-script script tag in IE (7, 8)
Reported by: | Pointy | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.4.3 |
Component: | manipulation | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Mr. Resig has blogged about (and therefore promoted) the use of script tags with funny, non-Javascript "type" attributes as a way to store things like template bodies. This is a fine idea and I have no complaints. However, the ".text()" function does not return the contents of such script tags on IE, while ".html()" does. The ".text()" function does work in Firefox and Chrome (haven't tried anything else).
Seems to me that ".text()" should work in this case, or at least behave uniformly.
I guess this is a
wontfix
as it is up to the user agent to decide what to do with<script>
tags which have a value set for thetype
attribute the user agent doesn't know how to handle.IE seems to ignore such
<script>
tags and just places the content in theinnerHTML
property but haschildNodes.length == 0
thustext()
fails to find anything as there are notTextNode
element to get the text from in IE