mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-04 19:05:49 +00:00
Add a note about referrer tracking
This commit is contained in:
@@ -175,7 +175,10 @@ const createDOMProps = (component, props, styleResolver) => {
|
|||||||
if (nativeID && nativeID.constructor === String) {
|
if (nativeID && nativeID.constructor === String) {
|
||||||
domProps.id = nativeID;
|
domProps.id = nativeID;
|
||||||
}
|
}
|
||||||
// Link security and automation test ids
|
// Link security
|
||||||
|
// https://mathiasbynens.github.io/rel-noopener/
|
||||||
|
// Note: using "noreferrer" doesn't impact referrer tracking for https
|
||||||
|
// transfers (i.e., from https to https).
|
||||||
if (component === 'a' && domProps.target === '_blank') {
|
if (component === 'a' && domProps.target === '_blank') {
|
||||||
domProps.rel = `${domProps.rel || ''} noopener noreferrer`;
|
domProps.rel = `${domProps.rel || ''} noopener noreferrer`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user