Closed
Bug 535001
Opened 15 years ago
Closed 14 years ago
pageMods always fires on iframes, adds matchIFrames options
Categories
(Mozilla Labs :: Jetpack Prototype, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 543526
People
(Reporter: morganrallen, Unassigned)
Details
Attachments
(1 file)
791 bytes,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2b4) Gecko/20091124 Firefox/3.6b4 XPCOMViewer/0.9a Build Identifier: IFrames in a page loaded from the same site will likely match again. This adds and options (defaulted off) to match IFrames. Reproducible: Always Steps to Reproduce: jetpack.future.import('pageModes'); var options = { matches: [ 'http://*' ], matchIFrames: true } jetpack.pageMods.add(console.log, options); Actual Results: Otherwise iframes will always match.
Reporter | ||
Comment 1•15 years ago
|
||
Allows user to decided to match IFrames or not. Defaults to no.
Comment 2•15 years ago
|
||
Oh, man. Now that is an awesome little patch :)
Comment 3•15 years ago
|
||
Comment on attachment 417809 [details] [diff] [review] Adds matchIFrame option to pageMods Not matching iframes is the common case, and I've seen lots of extensions (not to mention core Firefox code) implement this kind of filtering on their own (including after being stung by bugs related to subdocument loads), so this is a great change that will simplify the majority of jetpacks using pageMods! Two small issues: 1. The location check for subdocument loads should be on the subdocument location rather than the top document location, i.e. if I load foo.com, which loads a page from bar.com in an iframe, and I care about iframes but only about foo.com pages, I shouldn't be notified about the bar.com page. 2. This functionality applies to subdocuments loaded into frames in addition to iframes, and there may be other ways to load subdocuments (not including <script>, <link rel="stylesheet">, and <img> tags, which are part of the same "load group" internally but are not considered subdocuments), so I would call this matchSubdocuments or matchEmbeddedDocuments (preferring the former for brevity).
Updated•14 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•