<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mamorums</author_name>
  <author_url>https://blog.hatena.ne.jp/mamorums/</author_url>
  <blog_title>C#, Python, Web開発</blog_title>
  <blog_url>https://web-dev.hatenablog.com/</blog_url>
  <categories>
    <anon>JS/CSS/HTML</anon>
  </categories>
  <description>Electron で開発していて、レンダラープロセスからメインのモジュールを使いたい時がありました。これから、そのときに調べた使用方法をまとめていきます。 方法 remote を使うと、メインプロセスのモジュールを呼び出すことができます。 レンダラーのコード例 const {app, shell} = require('electron').remote; const path = require('path'); const fs = require(&quot;fs&quot;); const file = path.join( app.getPath('userData'), 'feed.json' ); …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fweb-dev.hatenablog.com%2Fentry%2Fweb%2Fjs%2Felectron%2Fuse-main-from-renderer&quot; title=&quot;Electron：レンダラーからメインのモジュールを使う - C#, Python, Web開発&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-04-10 06:30:00</published>
  <title>Electron：レンダラーからメインのモジュールを使う</title>
  <type>rich</type>
  <url>https://web-dev.hatenablog.com/entry/web/js/electron/use-main-from-renderer</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
