{"id":1475,"date":"2025-04-11T13:32:16","date_gmt":"2025-04-11T04:32:16","guid":{"rendered":"https:\/\/www.ambulo.tv\/blog\/?p=1475"},"modified":"2025-04-11T15:18:06","modified_gmt":"2025-04-11T06:18:06","slug":"webview2","status":"publish","type":"post","link":"https:\/\/www.ambulo.tv\/blog\/webview2\/","title":{"rendered":"WebView2"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>C#\/VB\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068WebView2\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\uff08Web\u30da\u30fc\u30b8\u306eJavaScript\uff09\u9593\u306e\u30c7\u30fc\u30bf\u9001\u53d7\u4fe1\u3000<a href=\"https:\/\/web.biz-prog.net\/readme\/webview_new3.html\" target=\"_blank\" rel=\"noreferrer noopener\">\ud83d\udd17<\/a><\/p>\n\n\n\n<p>\u30a4\u30d9\u30f3\u30c8\u30ea\u30b9\u30ca\u30fc <a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Learn_web_development\/Core\/Scripting\/Events\" target=\"_blank\" rel=\"noreferrer noopener\">\ud83d\udd17<\/a><\/p>\n\n\n\n<p>\u30cd\u30a4\u30c6\u30a3\u30d6\u5074\u30b3\u30fc\u30c9\u304b\u3089 Web \u5074\u30b3\u30fc\u30c9\u3092\u547c\u3073\u51fa\u3059 <a href=\"https:\/\/learn.microsoft.com\/ja-jp\/microsoft-edge\/webview2\/how-to\/javascript\" target=\"_blank\" rel=\"noreferrer noopener\">\ud83d\udd17<\/a><\/p>\n\n\n\n<p>Video\u518d\u751f\u4e2d\u304b\u306e\u5224\u5b9a <a href=\"https:\/\/ziyudom.com\/post-717\/\" target=\"_blank\" rel=\"noreferrer noopener\">\ud83d\udd17<\/a><\/p>\n\n\n\n<p>MEDIA_ERR_DECODE <a href=\"https:\/\/ja.player.support.brightcove.com\/troubleshooting\/brightcove-player-troubleshooting-guide.html#:~:text=MEDIA_ERR_DECODE%20*%20%E3%82%A8%E3%83%A9%E3%83%BC%E3%82%B3%E3%83%BC%E3%83%89:%203.%20*%20%E8%A6%8B%E5%87%BA%E3%81%97:%20%E5%8B%95%E7%94%BB%E3%81%8C%E6%82%AA%E3%81%84%E3%80%81%E3%81%BE%E3%81%9F%E3%81%AF%E3%83%96%E3%83%A9%E3%82%A6%E3%82%B6%E3%81%A7%E5%86%8D%E7%94%9F%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%84%E5%BD%A2%E5%BC%8F%E3%81%AB%E3%81%AA%E3%81%A3%E3%81%A6%E3%81%84%E3%82%8B%20*%20%E3%83%A1%E3%83%83%E3%82%BB%E3%83%BC%E3%82%B8:%20%E7%A0%B4%E6%90%8D%E3%81%AE%E5%95%8F%E9%A1%8C%E3%81%BE%E3%81%9F%E3%81%AF%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%84%E3%82%8B%E3%83%A1%E3%83%87%E3%82%A3%E3%82%A2%E3%81%AE%E6%A9%9F%E8%83%BD%E3%81%8C%E3%80%81%E3%81%8A%E4%BD%BF%E3%81%84%E3%81%AE%E3%83%96%E3%83%A9%E3%82%A6%E3%82%B6%E3%81%A7%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%AA%E3%81%84%E6%A9%9F%E8%83%BD%E3%81%AE%E3%81%9F%E3%82%81%E3%80%81%E3%83%A1%E3%83%87%E3%82%A3%E3%82%A2%E3%81%AE%E5%86%8D%E7%94%9F%E3%81%8C%E4%B8%AD%E6%AD%A2%E3%81%95%E3%82%8C%E3%81%BE%E3%81%97%E3%81%9F\" target=\"_blank\" rel=\"noreferrer noopener\">\ud83d\udd17<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MEDIA_ERR_DECODE\n\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9: 3\n\u898b\u51fa\u3057: \u52d5\u753b\u304c\u60aa\u3044\u3001\u307e\u305f\u306f\u30d6\u30e9\u30a6\u30b6\u3067\u518d\u751f\u3067\u304d\u306a\u3044\u5f62\u5f0f\u306b\u306a\u3063\u3066\u3044\u308b\n\u30e1\u30c3\u30bb\u30fc\u30b8: \u7834\u640d\u306e\u554f\u984c\u307e\u305f\u306f\u4f7f\u7528\u3057\u3066\u3044\u308b\u30e1\u30c7\u30a3\u30a2\u306e\u6a5f\u80fd\u304c\u3001\u304a\u4f7f\u3044\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u6a5f\u80fd\u306e\u305f\u3081\u3001\u30e1\u30c7\u30a3\u30a2\u306e\u518d\u751f\u304c\u4e2d\u6b62\u3055\u308c\u307e\u3057\u305f\n\u8003\u3048\u3089\u308c\u308b\u539f\u56e0\n\u30d6\u30e9\u30a6\u30b6\u304c\u8981\u6c42\u3055\u308c\u305f\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u518d\u751f\u3067\u304d\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3001\u518d\u751f\u4e2d\u3001\u307e\u305f\u306f\u5148\u982d\u306b\u5411\u304b\u3063\u3066\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\n\n\u8a66\u3059\u624b\u9806\n\u554f\u984c\u306e\u89e3\u6c7a\u3092\u8a66\u307f\u308b\u624b\u9806\u3092\u3044\u304f\u3064\u304b\u7d39\u4ecb\u3057\u307e\u3059\u3002\n\n\u30da\u30fc\u30b8\u3092\u66f4\u65b0\u3059\u308b\u3068\u3001\u6700\u521d\u306e\u8a66\u884c\u3067\u90e8\u5206\u7684\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u305f\u305f\u3081\u306b\u518d\u751f\u306b\u5931\u6557\u3057\u305f\u30b3\u30f3\u30c6\u30f3\u30c4\u304c\u518d\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\n\u30d6\u30e9\u30a6\u30b6\u3092\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002Chrome\u3068Firefox\u306f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u4fc3\u3059\u306f\u305a\u3067\u3059\u304c\u3001\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002<\/code><\/pre>\n\n\n\n<p>\u62e1\u5f35\u6a5f\u80fd\u306b\u304a\u3051\u308b\u30e1\u30e2\u30ea \u30ea\u30fc\u30af\u306e\u4e00\u822c\u7684\u306a\u539f\u56e0 <a href=\"https:\/\/udn.realityripple.com\/docs\/Extensions\/Common_causes_of_memory_leaks_in_extensions\" target=\"_blank\" rel=\"noreferrer noopener\">\ud83d\udd17<\/a><\/p>\n\n\n\n<p>Failing to clen up event listeners<\/p>\n\n\n\n<p>Firefox\u306e\u62e1\u5f35\u6a5f\u80fd\u306b\u95a2\u3059\u308b\u8a18\u8ff0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function leakref() {}\n\nfunction main(window) {\n  \/\/ This is a potential leak, as the window (e.g. browser.xul) will hold on to\n  \/\/ the leakref function and the enclosing compartment via the listener.\n  window.addEventListener(\"leaky\", leakref, true);\n\n  \/\/ The following line still fails to avoid the leak, as useCapture differs\n  \/\/ and removeEventListener will not remove anything.\n  \/\/ This kind of subtle bug is very common.\n  \/\/ unload(function() window.removeEventListener(\"leaky\", leakref, false), window);\n\n  \/\/ This is the right way to do it remove the listener.\n  unload(function() window.removeEventListener(\"leaky\", leakref, true), window);\n}<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\u975e\u540c\u671f\/\u540c\u671f\u304a\u3055\u3089\u3044<\/p>\n\n\n\n<p>async \/ await\u306b\u3064\u3044\u3066\u3001\u518d\u78ba\u8a8d(\u8d85\u521d\u5fc3\u8005\u5411\u3051) <a href=\"https:\/\/zenn.dev\/singularity\/articles\/360d69fde8322d\" target=\"_blank\" rel=\"noreferrer noopener\">\ud83d\udd17<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>C#\/VB\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068WebView2\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\uff08W&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54,23],"tags":[],"class_list":["post-1475","post","type-post","status-publish","format-standard","hentry","category-windows","category-23","article","has-background","has-excerpt","has-avatar","has-author","has-date","has-comment-count","has-category-meta","has-read-more","thumbnail-"],"_links":{"self":[{"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/posts\/1475"}],"collection":[{"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/comments?post=1475"}],"version-history":[{"count":7,"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/posts\/1475\/revisions"}],"predecessor-version":[{"id":1494,"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/posts\/1475\/revisions\/1494"}],"wp:attachment":[{"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/media?parent=1475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/categories?post=1475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ambulo.tv\/blog\/wp-json\/wp\/v2\/tags?post=1475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}