Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14098 closed bug (notabug)

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

Reported by: 15645519@… Owned by: 15645519@…
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 );

Change History (4)

comment:1 Changed 6 years ago by timmywil

Owner: set to 15645519@…
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:

comment:2 in reply to:  1 Changed 6 years ago by 15645519@…

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" :(

comment:3 Changed 6 years ago by timmywil

Resolution: notabug
Status: newclosed

This is not related to jQuery:

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

comment:4 in reply to:  3 Changed 6 years ago by anonymous

Replying to timmywil:

This is not related to jQuery:

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

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

Note: See TracTickets for help on using tickets.