Side navigation
#10724 closed bug (fixed)
Opened November 08, 2011 06:27PM UTC
Closed November 08, 2011 08:47PM UTC
$(document).text() always returns an empty string
Reported by: | madblueimp | Owned by: | timmywil |
---|---|---|---|
Priority: | high | Milestone: | 1.7.1 |
Component: | attributes | Version: | 1.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I'm not sure if .text() is supposed to work on the document element, but the following code used to work on prior versions, but always returns an empty string with jQuery 1.7:
var textContent = $(document).text();
Attachments (0)
Change History (3)
Changed November 08, 2011 06:35PM UTC by comment:1
component: | unfiled → attributes |
---|---|
owner: | → timmywil |
priority: | undecided → high |
status: | new → assigned |
Changed November 08, 2011 06:44PM UTC by comment:2
milestone: | None → 1.7.1 |
---|
It's the new Sizzle.getText, it gets a jQuery collection array from jQuery.fn.text that is just the document element and falls into the wrong case. (A document is 9 btw).
Confirmed
http://jsfiddle.net/rwaldron/v9jUX/