I have successfully created an chrome extension which simply when pressed says hello word. Now when i tried to demonstrate a simple button when pressed alert comes out, doesn't work. I am thinking if it is perhaps because i use javascript inside and it has html extension.
In my folder which gets loaded in chrome has inside a)manifest.json b)lab.html c)an icon
lab.html
<textarea id="s" rows="2" cols="4" name="p"></textarea></br>
<button onclick="button()">Submit</button>
<script>
function button()
{
alert("alert");
}
</script>
manifest
{
"name": "Your Extension Name",
"description": "Your Extension Description",
"browser_action": {
"default_icon": {
"38": "icon.png"
},
"default_title": "Your Extension Popup Title",
"default_popup": "lab.html"
},
"manifest_version": 2,
"update_url": "http://clients2.google.com/service/update2/crx",
"content_security_policy": "script-src 'self' https://www.google.com; object-src 'self'",
"version": "0.1"
}