mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Implement window.alert on Android
This commit is contained in:
parent
66e5ad0cb8
commit
d339d1f30b
1 changed files with 5 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
package org.mozilla.servo;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
|
@ -131,6 +132,10 @@ public class MainActivity extends Activity implements Servo.Client {
|
|||
|
||||
@Override
|
||||
public void onAlert(String message) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setMessage(message);
|
||||
AlertDialog alert = builder.create();
|
||||
alert.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue