<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>cateiru</author_name>
  <author_url>https://blog.hatena.ne.jp/cateiru/</author_url>
  <blog_title>cateiru のブログ</blog_title>
  <blog_url>https://blog.cateiru.com/</blog_url>
  <categories>
    <anon>技術</anon>
  </categories>
  <description>ブラウザ拡張機能作っていますか？そこで eval を実行したいというケースは多くあると思います。 例えば、 options ページにてユーザーが任意のコードを入力できるようにしてそれを実行するケースなどです。任意の JavaScript コードを実行する際には eval や new Function を使いますが、ブラウザ拡張機能では簡単に使うことはできません。特に、 Manifest V3 ではよりセキュリティが向上しており単体での eval とそれ相応の機能はほぼ使用不可*1となっています。 これらの制約下でもどうしても eval を実行できるようにする方法を解説します。 この解説では拡張…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.cateiru.com%2Fentry%2F2024%2F10%2F08%2F233515&quot; title=&quot;【ブラウザ拡張】manifest v2 と v3 で実行可能な eval を作る - cateiru のブログ&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>2024-10-08 23:35:15</published>
  <title>【ブラウザ拡張】manifest v2 と v3 で実行可能な eval を作る</title>
  <type>rich</type>
  <url>https://blog.cateiru.com/entry/2024/10/08/233515</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
