前回の続きです。
その2はこちら
設定画面にボタンを置いてみます。
こんな流れ
- config.htmlにボタンを設置
- config.jsにボタンが押された時にポップアップを表示するコードを作成
設定画面にボタンを設置
config.html
<html>
<body>
<h1>Hello,world設定画面</h1>
<div id="form">
<button type="button" id="button_submit">押してください</button>
</div>
</body>
</html>

config.jsにボタン押下時にポップアップを表示させる
config.js
(function () {
"use strict";
window.addEventListener('DOMContentLoaded', function() {
document.getElementById("button_submit").onclick = function() {
window.alert("押しましたね!");
};
});
})();

次回は設定値を登録・読み込みしてみたいと思います。