private ValueCallback<Uri[]> uploadMessageAboveL;
private Uri uri;
...
zwv.setWebChromeClient(new WebChromeClient() {
@Override
public boolean onShowFileChooser(WebView view, ValueCallback<Uri[]> filePath, WebChromeClient.FileChooserParams fileChooserParams) {
uploadMessageAboveL = filePath;
uri = generateFileUri();
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
startActivityForResult(intent, FILE_CHOOSER_RESULT_CODE);
return true;
}
});
...
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
...
Uri[] results = null;
if (resultCode == Activity.RESULT_OK) {
results = new Uri[1];
results[0] = uri;
}
uploadMessageAboveL.onReceiveValue(results);
}
Есть ли еще какая нибудь технология для асинхронных запросов к бэкэнду кроме ajax? В качестве бэкэнда golangНа чем бекенд - разницы особо нет (обычно).
const arr = this._slides.map((_, i) => i) //Если _slides массив.
console.log(arr)
// -------------
const arr = Array.prototype.map.call(this._slides, (_, i) => i)
console.log(arr)
redirectclipboard:i:1
redirectprinters:i:1
redirectcomports:i:1
redirectsmartcards:i:1
devicestoredirect:s:*
drivestoredirect:s:*
redirectdrives:i:1
session bpp:i:32
prompt for credentials on client:i:1
span monitors:i:1
use multimon:i:1
remoteapplicationmode:i:1
server port:i:3389
allow font smoothing:i:1
promptcredentialonce:i:1
videoplaybackmode:i:1
audiocapturemode:i:0
gatewayusagemethod:i:1
gatewayprofileusagemethod:i:1
gatewaycredentialssource:i:0
full address:s:myserver.my.domain
alternate shell:s:||Amstart
remoteapplicationprogram:s:||Amstart
gatewayhostname:s:
remoteapplicationname:s:my-program-name
remoteapplicationcmdline:s:
workspace id:s:myserver.my.domain
use redirection server name:i:1
loadbalanceinfo:s:tsv://MS Terminal Services Plugin.1.srv
alternate full address:s:myserver.my.domain
signscope:s:Full Address,Alternate Full Address,Use Redirection Server Name,Server Port,GatewayHostname,GatewayUsageMethod,GatewayProfileUsageMethod,GatewayCredentialsSource,PromptCredentialOnce,Alternate Shell,RemoteApplicationProgram,RemoteApplicationMode,RemoteApplicationName,RemoteApplicationCmdLine,RedirectDrives,RedirectPrinters,RedirectCOMPorts,RedirectSmartCards,RedirectClipboard,DevicesToRedirect,DrivesToRedirect,LoadBalanceInfo
signature:s:bla-bla-bla-signature
<ul>
<li><a href="#">Пункт &</a></li>
<li><a href="#">Пункт &</a></li>
<li><a href="#">Пункт &</a></li>
<li><a href="#">Пункт &</a></li>
</ul>
The error is due to an error converting the coordinates of the gradient from double to float and can be fixed by forcing the radial gradient coordinates to be Int32s
Bitwise or with 0 will convert from JS Number to Int32 (signed integer 32bits) and fix the problem.
var gradient = ctx.createRadialGradient(
grad_x0 | 0,
grad_y0 | 0,
options.radius | 0,
options.x0 | 0,
options.y0 | 0,
0
);