Skip to main content

Bug Tracker

Side navigation

#14098 closed bug (notabug)

Opened July 03, 2013 09:14AM UTC

Closed July 16, 2013 12:25AM UTC

Last modified July 17, 2013 02:25AM UTC

contents()function can't support 'frame',only 'iframe'

Reported by: 15645519@qq.com Owned by: 15645519@qq.com
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.1
Keywords: Cc:
Blocked by: Blocking:
Description

contents: function( elem ) {

return jQuery.nodeName( elem, "iframe" ) ?

elem.contentDocument || elem.contentWindow.document :

jQuery.merge( [], elem.childNodes );

Attachments (0)
Change History (4)

Changed July 04, 2013 05:05PM UTC by timmywil comment:1

owner: → 15645519@qq.com
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the "jQuery(edge)" version to ensure the issue still exists—you may need to change this to a specific version depending on the test case.

To get you started, use the appropriate boilerplate:

Open the link and click to "Fork" (in the top menu) to begin.

Also, please read:

Additional resources:

Changed July 05, 2013 05:59AM UTC by 15645519@qq.com comment:2

status: pendingnew

http://jsfiddle.net/xYhve/

HTML:

<frameset>

<frame id="f" />

</frameset>

<iframe id="i" />

JS:

alert($("#f").contents()[0]);

alert($("#i").contents()[0]);

I saw the any Version code of Jquery Core Js:

contents: function( elem ) {return jQuery.nodeName( elem, "iframe" ) ? ...

only check "iframe", no "frame" :(

Changed July 16, 2013 12:25AM UTC by timmywil comment:3

resolution: → notabug
status: newclosed

This is not related to jQuery:

http://jsfiddle.net/timmywil/xYhve/2/show/

Changed July 17, 2013 02:25AM UTC by anonymous comment:4

Replying to [comment:3 timmywil]:

This is not related to jQuery: http://jsfiddle.net/timmywil/xYhve/2/show/

?????? 真搞不懂你们的办事方式,明明是有问题的!