This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install --save electron-json-storage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
var main = require("remote").require("./main"); | |
// remoteでMainProcessのメソッドを呼び出す。 | |
function exampleRemote() { | |
console.log("exampleRemote"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
var main = require("remote").require("./main"); | |
// 引数を設定し、MainProcess側に値を渡す | |
function exampleRemoteArgsText() { | |
console.log("exampleRemoteArgsText"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
var main = require("remote").require("./main"); | |
// functionを引数に設定し、MainProcess側で実行する | |
function exampleRemoteArgsFunc() { | |
console.log("exampleRemoteArgsFunc"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
var ipc = require('ipc'); | |
// 非同期でメインプロセスからのメッセージを受信する | |
ipc.on('main-process-message', function(args) { | |
console.log("main process message : " + args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
var ipc = require('ipc'); | |
// 同期でレンダラープロセスからメインプロセスにメッセージを送信する | |
function synchronousMessage() { | |
console.log("synchronousMessage"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
var ipc = require('ipc'); | |
// 非同期でレンダラープロセスからメインプロセスにメッセージを送信する | |
function asynchronousMessage() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
function notification() { | |
new Notification("Hello World"); | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<script type="text/javascript"> | |
var main = require("remote").require("./main"); | |
function notificationMainProcess() { | |
main.notificationMainProcess(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Botkit = require('botkit'); | |
var controller = Botkit.slackbot({ | |
debug: false | |
}); | |
controller.spawn({ | |
token: process.env.token | |
}).startRTM(); |
OlderNewer