Java netscape.javascript.JSObject used for storing cookies

Deadly 提交于 2019-12-06 16:54:58

Please refer to this documentation of Credential Management API - https://whatwebcando.today/credentials.html

Using the API you can programmatically force a save password dialog to show to user, who can decide whether to save the password. The API is currently supported only in Chrome.

Basically this API has nothing to do with Webswing, anyway you should be able to use the Credential Management API same way you use netscape.javascript.JSObject to work with cookies. Try this, it worked for me with Webswing:

global.eval("navigator.credentials.store(new PasswordCredential({id: 'username@email.com', password: 'password', name: 'User Name'}));");
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!