next-csrf
Version:
CSRF mitigation library for Next.js
14 lines (10 loc) • 516 B
JavaScript
import platform from '../util/platform';
// Firefox seems to be handling the SVG-document-in-iframe creation asynchronously
// and thereby produces a false negative test result. Thus the test is pointless
// and we resort to UA sniffing once again.
// see http://jsbin.com/vunadohoko/1/edit?js,console,output
var result = Boolean(platform.is.GECKO && typeof SVGElement !== 'undefined' && SVGElement.prototype.focus);
export default function () {
return result;
}
//# sourceMappingURL=focus-svg-in-iframe.js.map