Commit f9688a30 authored by Yuri Mataev's avatar Yuri Mataev Committed by Natalia Tepluhina

mock_u2f_device.js: remove IIFE

parent 3f599913
/* eslint-disable no-unused-expressions, no-return-assign, no-param-reassign */ /* eslint-disable no-unused-expressions */
export default class MockU2FDevice { export default class MockU2FDevice {
constructor() { constructor() {
this.respondToAuthenticateRequest = this.respondToAuthenticateRequest.bind(this); this.respondToAuthenticateRequest = this.respondToAuthenticateRequest.bind(this);
this.respondToRegisterRequest = this.respondToRegisterRequest.bind(this); this.respondToRegisterRequest = this.respondToRegisterRequest.bind(this);
window.u2f || (window.u2f = {}); window.u2f || (window.u2f = {});
window.u2f.register = (function(_this) { window.u2f.register = (appId, registerRequests, signRequests, callback) => {
return function(appId, registerRequests, signRequests, callback) { this.registerCallback = callback;
return (_this.registerCallback = callback); };
}; window.u2f.sign = (appId, challenges, signRequests, callback) => {
})(this); this.authenticateCallback = callback;
window.u2f.sign = (function(_this) { };
return function(appId, challenges, signRequests, callback) {
return (_this.authenticateCallback = callback);
};
})(this);
} }
respondToRegisterRequest(params) { respondToRegisterRequest(params) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment