зеркало из https://github.com/mozilla/pjs.git
427456 - r=sayrer, a=beltzner - rename recurseFrames to recurseExternalFrame in uF api
This commit is contained in:
Родитель
c4b776ce0c
Коммит
5c3fb469dd
|
@ -16,7 +16,8 @@ var Microformats = {
|
||||||
* @param name The name of the microformat (required)
|
* @param name The name of the microformat (required)
|
||||||
* @param rootElement The DOM element at which to start searching (required)
|
* @param rootElement The DOM element at which to start searching (required)
|
||||||
* @param options Literal object with the following options:
|
* @param options Literal object with the following options:
|
||||||
* recurseFrames - Whether or not to search child frames
|
* recurseExternalFrames - Whether or not to search child frames
|
||||||
|
* that reference external pages (with a src attribute)
|
||||||
* for microformats (optional - defaults to true)
|
* for microformats (optional - defaults to true)
|
||||||
* showHidden - Whether or not to add hidden microformat
|
* showHidden - Whether or not to add hidden microformat
|
||||||
* (optional - defaults to false)
|
* (optional - defaults to false)
|
||||||
|
@ -48,8 +49,8 @@ var Microformats = {
|
||||||
var defaultView = rootElement.defaultView || rootElement.ownerDocument.defaultView;
|
var defaultView = rootElement.defaultView || rootElement.ownerDocument.defaultView;
|
||||||
var rootDocument = rootElement.ownerDocument || rootElement;
|
var rootDocument = rootElement.ownerDocument || rootElement;
|
||||||
|
|
||||||
/* If recurseFrames is undefined or true, look through all child frames for microformats */
|
/* If recurseExternalFrames is undefined or true, look through all child frames for microformats */
|
||||||
if (!options || !options.hasOwnProperty("recurseFrames") || options.recurseFrames) {
|
if (!options || !options.hasOwnProperty("recurseExternalFrames") || options.recurseExternalFrames) {
|
||||||
if (defaultView && defaultView.frames.length > 0) {
|
if (defaultView && defaultView.frames.length > 0) {
|
||||||
for (let i=0; i < defaultView.frames.length; i++) {
|
for (let i=0; i < defaultView.frames.length; i++) {
|
||||||
if (isAncestor(rootDocument, defaultView.frames[i].frameElement)) {
|
if (isAncestor(rootDocument, defaultView.frames[i].frameElement)) {
|
||||||
|
@ -118,7 +119,8 @@ var Microformats = {
|
||||||
* @param name The name of the microformat (required)
|
* @param name The name of the microformat (required)
|
||||||
* @param rootElement The DOM element at which to start searching (required)
|
* @param rootElement The DOM element at which to start searching (required)
|
||||||
* @param options Literal object with the following options:
|
* @param options Literal object with the following options:
|
||||||
* recurseFrames - Whether or not to search child frames
|
* recurseExternalFrames - Whether or not to search child frames
|
||||||
|
* that reference external pages (with a src attribute)
|
||||||
* for microformats (optional - defaults to true)
|
* for microformats (optional - defaults to true)
|
||||||
* showHidden - Whether or not to add hidden microformat
|
* showHidden - Whether or not to add hidden microformat
|
||||||
* (optional - defaults to false)
|
* (optional - defaults to false)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче