2018-10-15 23:27:58 +00:00
<!doctype html>
< html lang = "en" >
< head >
< meta charset = "UTF-8" >
2019-03-15 01:55:50 +00:00
< meta name = "viewport" content = "width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" >
2018-10-15 23:27:58 +00:00
< meta http-equiv = "X-UA-Compatible" content = "ie=edge" >
2019-03-15 01:55:50 +00:00
< title > Flutter InAppBrowser< / title >
2019-10-26 20:11:23 +00:00
< link rel = "stylesheet" href = "http://getbootstrap.com/docs/4.3/dist/css/bootstrap.min.css" >
2018-10-15 23:27:58 +00:00
< link rel = "stylesheet" href = "css/style.css" >
< script src = "https://code.jquery.com/jquery-3.3.1.min.js" > < / script >
2019-11-02 18:58:01 +00:00
< link rel = "shortcut icon" href = "favicon.ico" >
2018-10-15 23:27:58 +00:00
< / head >
2019-03-15 01:55:50 +00:00
< body class = "text-center" >
< div class = "cover-container d-flex w-100 h-100 p-3 mx-auto flex-column" >
< header class = "masthead mb-auto" >
< div class = "inner" >
< h3 class = "masthead-brand" > Flutter InAppBrowser< / h3 >
< nav class = "nav nav-masthead justify-content-center" >
< a class = "nav-link active" href = "index.html" > Home< / a >
< a class = "nav-link" href = "page-1.html" > Page 1< / a >
< a class = "nav-link" href = "page-2.html" > Page 2< / a >
< / nav >
2018-10-15 23:27:58 +00:00
< / div >
2019-03-15 01:55:50 +00:00
< / header >
< main role = "main" class = "inner cover" >
< h1 class = "cover-heading" > Inline WebView< / h1 >
2019-10-26 02:42:50 +00:00
< img src = "my-special-custom-scheme://images/flutter-logo.svg" alt = "flutter logo" >
2019-03-15 01:55:50 +00:00
< p class = "lead" > Cover is a one-page template for building simple and beautiful home pages. Download, edit the text, and add your own fullscreen background photo to make it your own.< / p >
2019-11-02 18:58:01 +00:00
< select name = "" id = "" >
< option value = "1" > option 1< / option >
< option value = "2" > option 2< / option >
< / select >
2019-11-06 21:55:54 +00:00
< input type = "file" >
< input type = "file" accept = "image/*" capture >
2019-11-05 23:23:24 +00:00
< button onclick = "testHistoryPush1()" > History Push 1< / button >
< button onclick = "testHistoryPush2()" > History Push 2< / button >
< button onclick = "testLocationHref()" > Location Href< / button >
2019-10-27 03:35:05 +00:00
< p >
< img src = "https://via.placeholder.com/100x50" alt = "placeholder 100x50" >
2019-03-15 01:55:50 +00:00
< / p >
< / main >
2019-11-04 00:39:23 +00:00
<!-- <form method="POST" action="http://192.168.1.20:8082/test - post">
< input type = "text" name = "name" placeholder = "name" value = "Lorenzo" >
< input type = "submit" value = "SEND" >
< / form > -->
2019-03-15 01:55:50 +00:00
< footer class = "mastfoot mt-auto" >
< div class = "inner" >
2019-10-26 02:42:50 +00:00
< p > Cover template for < a target = "_blank" href = "https://getbootstrap.com/" > Bootstrap< / a > , by < a href = "https://twitter.com/mdo" > @mdo< / a > .< / p >
< p > Phone link example < a href = "tel:1-408-555-5555" > 1-408-555-5555< / a > < / p >
< p > Email link example < a href = "mailto:example@gmail.com" > example@gmail.com< / a > < / p >
2018-10-15 23:27:58 +00:00
< / div >
2019-03-15 01:55:50 +00:00
< / footer >
2018-10-15 23:27:58 +00:00
< / div >
2019-03-15 01:55:50 +00:00
2018-10-15 23:27:58 +00:00
< script >
2019-11-05 23:23:24 +00:00
var state = { 'page_id': 1, 'user_id': 5 };
function testHistoryPush1() {
var randomNumber = 100 * Math.random();
var title = 'Hello World ' + randomNumber;
var url = 'hello-foo-' + randomNumber + '.html';
history.pushState(state, title, url);
}
function testHistoryPush2() {
var randomNumber = 100 * Math.random();
var title = 'Hello World ' + randomNumber;
var url = 'hello-bar-' + randomNumber + '.html';
history.replaceState(state, title, url);
}
function testLocationHref() {
var randomNumber = 100 * Math.random();
window.location = "#foo-" + randomNumber;
}
2019-11-16 11:41:30 +00:00
window.addEventListener("flutterInAppBrowserPlatformReady", function(event) {
window.flutter_inappbrowser.callHandler('handlerFoo').then(function(result) {
console.log(result, typeof result);
console.log(JSON.stringify(result), result.bar);
});
2019-03-15 01:55:50 +00:00
2019-11-16 11:41:30 +00:00
window.flutter_inappbrowser.callHandler('handlerFooWithArgs', 1, true, ['bar', 5], {foo: 'baz'}).then(function(result) {
console.log(result, typeof result);
console.log(JSON.stringify(result));
});
2019-03-14 04:35:20 +00:00
});
2019-11-10 23:16:38 +00:00
2019-10-27 03:35:05 +00:00
$(document).ready(function() {
2019-11-05 02:44:22 +00:00
console.log("jQuery ready");
var xhttp = new XMLHttpRequest();
xhttp.addEventListener("load", function() {
2019-11-10 23:16:38 +00:00
console.log(this.response);
2019-11-05 02:44:22 +00:00
});
xhttp.open("POST", "http://192.168.1.20:8082/test-ajax-post");
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.send("name=Lorenzo");
var xhttp2 = new XMLHttpRequest();
xhttp2.open("GET", "http://192.168.1.20:8082/test-download-file");
xhttp2.send();
fetch(new Request("http://192.168.1.20:8082/test-download-file")).then(function(response) {
console.log(response);
}).catch(function(error) {
console.error("ERROR: " + error);
});
2019-11-06 21:55:54 +00:00
fetch("http://192.168.1.20:8082/test-ajax-post", {
method: 'POST',
body: JSON.stringify({
name: 'Lorenzo Fetch API'
}),
headers: {
'Content-Type': 'application/json'
}
}).then(function(response) {
console.log(response);
}).catch(function(error) {
console.error("ERROR: " + error);
});
2019-10-29 11:16:31 +00:00
/*
2019-10-29 02:03:50 +00:00
alert("Alert Popup");
console.log(confirm("Press a button!"));
2019-10-29 11:16:31 +00:00
console.log(prompt("Please enter your name", "Lorenzo"));
*/
2019-10-28 03:58:25 +00:00
2019-10-29 11:16:31 +00:00
/*
2019-10-28 03:58:25 +00:00
if ("geolocation" in navigator) {
console.log("Geolocation API enabled");
navigator.geolocation.getCurrentPosition(function(position) {
console.log(position.coords.latitude, position.coords.longitude);
});
} else {
console.log("No geolocation API");
2019-10-29 11:16:31 +00:00
}
*/
2019-10-27 03:35:05 +00:00
});
2018-10-15 23:27:58 +00:00
< / script >
< / body >
< / html >