I am working on building some pages in polymer to use in android web view.
demo code below
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title></title>
</head>
<body>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="import" href="bower_components/polymer/polymer.html">
<dom-module id="trail-app">
<template>
<style>
</style>
<div id="content"></div>
</template>
<script>
Polymer({
is: "trail-app",
loadDataOne:function(data){
document.getElementById("content").innerHTML = data;
},
});
</script>
<script type="text/javascript">
function loadDataTwo(data) {
document.getElementById("content").innerHTML = data;
}
</script>
</dom-module>
<trail-app></trail-app>
</body>
</html>
So my problem here is if the function loadDataTwo
is called like this myWebView.loadUrl("javascript:loadDataTwo('Hello World!')");
it is working fine.
But if the function loadDataOne
is called same way its not working.How to resolve.