Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
callback: (element: Element) => {
// This share API is based off https://facebook.github.io/react-native/docs/0.52/share
const dialogTitle: ?DOMString = element.getAttributeNS(
Namespaces.SHARE,
'dialog-title',
);
const message: ?DOMString = element.getAttributeNS(
Namespaces.SHARE,
'message',
);
const subject: ?DOMString = element.getAttributeNS(
Namespaces.SHARE,
'subject',
);
const title: ?DOMString = element.getAttributeNS(Namespaces.SHARE, 'title');
const url: ?DOMString = element.getAttributeNS(Namespaces.SHARE, 'url');
const content = getContent(message, title, url);
if (content) {
const options = getOptions(dialogTitle, subject);
callback: (element: Element) => {
// This share API is based off https://facebook.github.io/react-native/docs/0.52/share
const dialogTitle: ?DOMString = element.getAttributeNS(
Namespaces.SHARE,
'dialog-title',
);
const message: ?DOMString = element.getAttributeNS(
Namespaces.SHARE,
'message',
);
const subject: ?DOMString = element.getAttributeNS(
Namespaces.SHARE,
'subject',
);
const title: ?DOMString = element.getAttributeNS(Namespaces.SHARE, 'title');
const url: ?DOMString = element.getAttributeNS(Namespaces.SHARE, 'url');
const content = getContent(message, title, url);
if (content) {
const options = getOptions(dialogTitle, subject);
Share.share(content, options);
}
},
};
import Navigation, { ANCHOR_ID_SEPARATOR } from 'hyperview/src/services/navigation';
import React from 'react';
import VisibilityDetectingView from './VisibilityDetectingView.js';
import { addHref, createProps, getBehaviorElements, getFirstTag, later, shallowCloneToRoot, getFormData } from 'hyperview/src/services';
import { version } from '../package.json';
import { ACTIONS, FORM_NAMES, NAV_ACTIONS, ON_EVENT_DISPATCH, UPDATE_ACTIONS } from 'hyperview/src/types';
import urlParse from 'url-parse';
import eventEmitter from 'tiny-emitter/instance';
const AMPLITUDE_NS = Namespaces.AMPLITUDE;
const HYPERVIEW_ALERT_NS = Namespaces.HYPERVIEW_ALERT;
const HYPERVIEW_NS = Namespaces.HYPERVIEW;
const INTERCOM_NS = Namespaces.INTERCOM;
const PHONE_NS = Namespaces.PHONE;
const REDUX_NS = Namespaces.REDUX;
const SHARE_NS = Namespaces.SHARE;
const SMS_NS = Namespaces.SMS;
const HYPERVIEW_VERSION = version;
function getHyperviewHeaders() {
const { width, height } = Dimensions.get('window');
return {
'X-Hyperview-Version': HYPERVIEW_VERSION,
'X-Hyperview-Dimensions': `${width}w ${height}h`,
};
}
/**
*
*/