protected function linkTargetCanAccessOpener(DOMElement $element)
	{
		// Can't access window.opener if the link doesn't have a target
		if (!$element->hasAttribute('target'))
		{
			return false;
		}

		// Can't access window.opener if the link already has rel="noopener" or rel="noreferrer"
		if (preg_match('(\\bno(?:open|referr)er\\b)', $element->getAttribute('rel')))
		{
			return false;
		}

		return true;
	}
protected function linkTargetCanAccessOpener(DOMElement $element)
	{
		// Can't access window.opener if the link doesn't have a target
		if (!$element->hasAttribute('target'))
		{
			return false;
		}

		// Can't access window.opener if the link already has rel="noopener" or rel="noreferrer"
		if (preg_match('(\\bno(?:open|referr)er\\b)', $element->getAttribute('rel')))
		{
			return false;
		}

		return true;
	}
protected function linkTargetCanAccessOpener ( DOMElement $ element ) { // Can't access window.opener if the link doesn't have a target if ( ! $ element -> hasAttribute ( 'target' ) ) { return false ; } // Can't access window.opener if the link already has rel="noopener" or rel="noreferrer" if ( preg_match ( '(\\bno(?:open|referr)er\\b)' , $ element -> getAttribute ( 'rel' ) ) ) { return false ; } return true ; }
Test whether given link element will let the target access window.opener

@param  DOMElement $element
@return bool
Test whether given link element will let the target access window . opener