src/fullscreen.js
function findSupported(apiList, document) {

	let standardApi = apiList[0];
	let supportedApi = null;

	for (let i = 0, len = apiList.length; i < len; i++) {

		let api = apiList[ i ];

		if (api[1] in document) {
			supportedApi = api;
			break;
		}
	}

	if (Array.isArray(supportedApi)) {

		return supportedApi.reduce((result, funcName, i) => {
			result[ standardApi[ i ] ] = funcName;
			return result;
		}, {});

	} else {

		return null;
	}
}
function findSupported(apiList, document) {

	let standardApi = apiList[0];
	let supportedApi = null;

	for (let i = 0, len = apiList.length; i < len; i++) {

		let api = apiList[ i ];

		if (api[1] in document) {
			supportedApi = api;
			break;
		}
	}

	if (Array.isArray(supportedApi)) {

		return supportedApi.reduce((result, funcName, i) => {
			result[ standardApi[ i ] ] = funcName;
			return result;
		}, {});

	} else {

		return null;
	}
}
function findSupported ( apiList , document ) { let standardApi = apiList [ 0 ] ; let supportedApi = null ; for ( let i = 0 , len = apiList . length ; i < len ; i ++ ) { let api = apiList [ i ] ; if ( api [ 1 ] in document ) { supportedApi = api ; break ; } } if ( Array . isArray ( supportedApi ) ) { return supportedApi . reduce ( ( result , funcName , i ) => { result [ standardApi [ i ] ] = funcName ; return result ; } , { } ) ; } else { return null ; } }
Finds a supported fullscreen API.

@param   {Array}    apiList      The list of possible fullscreen APIs.
@param   {Document} document     The source of the fullscreen interface.
@returns {Object}
Finds a supported fullscreen API .