Add protocol conversion for setFrame call
MODIFY
lib/jsonwp-proxy/protocol-converter.js
lib/jsonwp-proxy/protocol-converter.js
@@ -171,6 +171,16 @@ class ProtocolConverter {
return await this.proxyFunc(url, method, body);
}
+ async proxySetFrame (url, method, body) {
+ const bodyObj = util.safeJsonParse(body);
+ return _.has(bodyObj, 'id') && _.isPlainObject(bodyObj.id)
+ ? await this.proxyFunc(url, method, {
+ ...bodyObj,
+ id: duplicateKeys(bodyObj.id, MJSONWP_ELEMENT_KEY, W3C_ELEMENT_KEY),
+ })
+ : await this.proxyFunc(url, method, body);
+ }
+
async proxyPerformActions (url, method, body) {
const bodyObj = util.safeJsonParse(body);
return _.isPlainObject(bodyObj)
@@ -205,6 +215,8 @@ class ProtocolConverter {
return await this.proxySetValue(url, method, body);
case 'performActions':
return await this.proxyPerformActions(url, method, body);
+ case 'setFrame':
+ return await this.proxySetFrame(url, method, body);
default:
break;
}

Add protocol conversion for setFrame call (#340)