{"id":122,"date":"2023-10-16T14:23:03","date_gmt":"2023-10-16T05:23:03","guid":{"rendered":"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/?p=122"},"modified":"2023-10-17T10:12:56","modified_gmt":"2023-10-17T01:12:56","slug":"%e5%9b%b3%e8%a7%a3-webjavascript%e3%81%a7%e9%9f%b3%e5%a3%b0%e5%87%a6%e7%90%86-in-2023%e3%80%80","status":"publish","type":"post","link":"https:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/?p=122","title":{"rendered":"\u56f3\u89e3 Web(JavaScript)\u3067\u97f3\u58f0\u51e6\u7406 in 2023\u3000"},"content":{"rendered":"\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-13 wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">\u3053\u308c\u306f\u4f55\uff1f<\/h3>\n\n\n\n<p>\u97f3\u58f0\u51e6\u7406\u3092\u3059\u308bWeb\u30a2\u30d7\u30ea\u3092\u4f5c\u308b\u4e0a\u3067\u3001\u6b32\u3057\u304f\u306a\u308b\u60c5\u5831\u3092\u307e\u3068\u3081\u305f\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">\u4f55\u304c\u3057\u305f\u3044\u306e\uff1f<\/h3>\n\n\n\n<p>\u97f3\u58f0\u3092\u30de\u30a4\u30af\u3067\u9332\u97f3\u3057\u305f\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3093\u3060\u308a\u3057\u305f\u97f3\u58f0\u30c7\u30fc\u30bf\u3092\u3001\u4f55\u3089\u304b\u306e\u97f3\u58f0\u51e6\u7406\uff08\u30d5\u30a3\u30eb\u30bf\u30fc\uff09\u3092\u9069\u7528\u3057\u3066\u3001\u305d\u306e\u51fa\u529b\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u308bWeb\u30a2\u30d7\u30ea\u3092\u4f5c\u308a\u305f\u3044\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">\u8ab0\u306e\u305f\u3081\uff1f<\/h3>\n\n\n\n<p>\u3056\u3063\u304f\u308a\u3068web\u4e0a\u3067\u306e\u97f3\u58f0\u51e6\u7406\u306e\u6d41\u308c\u3092\u77e5\u308a\u305f\u3044\u4eba\u3002\u8a73\u7d30\u306a\u4f7f\u3044\u65b9\u306f\u5404\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u306e\u3053\u3068\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">\u4eca\u56de\u306e\u4e3b\u5f79<\/h3>\n\n\n\n<p>Web Audio API: \u97f3\u58f0\u3092\u8aad\u307f\u8fbc\u307f\u3001\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u9069\u7528\u3057\u3001\u30b9\u30d4\u30fc\u30ab\u30fc\u306b\u51fa\u529b\u3059\u308b\u3053\u3068\u3092\u53f8\u308bAPI\uff08<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/API\/Web_Audio_API\">https:\/\/developer.mozilla.org\/ja\/docs\/Web\/API\/Web_Audio_API<\/a>\uff09<\/p>\n\n\n\n<p>Media Capture and Streams API: \u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u3084\u30de\u30a4\u30af\u3068\u3044\u3063\u305f\u30d6\u30e9\u30a6\u30b6\u306e\u5916\u5074\u306b\u8fd1\u3044\u30e1\u30c7\u30a3\u30a2\u3092\u53f8\u308bAPI\u3002\u30de\u30a4\u30af\u5165\u529b\u3068\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u4f5c\u6210\u306b\u4f7f\u3046\uff08<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/API\/Media_Capture_and_Streams_API\">https:\/\/developer.mozilla.org\/ja\/docs\/Web\/API\/Media_Capture_and_Streams_API<\/a>\uff09<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h3 class=\"wp-block-heading\">\u56f3\u89e3<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">\u51e1\u4f8b<\/h4>\n\n\n\n<ul>\n<li>\u2192 \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u6d41\u308c<\/li>\n\n\n\n<li>\u21d2 AudioContext\u5185\u306e\u63a5\u7d9a\uff08connect)<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"763\" height=\"1581\" src=\"http:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/wp-content\/uploads\/2023\/10\/jsAudio.drawio.png\" alt=\"\" class=\"wp-image-131\"\/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-12 wp-block-group-is-layout-constrained\" style=\"margin-top:var(--wp--preset--spacing--30);margin-bottom:var(--wp--preset--spacing--30);padding-top:0;padding-bottom:0\">\n<h3 class=\"wp-block-heading\">\u88dc\u8db3<\/h3>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h4 class=\"wp-block-heading\">\u52d5\u4f5c\u74b0\u5883\u306b\u3064\u3044\u3066<\/h4>\n\n\n\n<p>fetch()\u306a\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u6271\u3046\u51e6\u7406\u306f\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3060\u3068\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u95a2\u4fc2\u3067\u52d5\u4f5c\u3057\u306a\u3044\u3002python\u306a\u3069\u3067\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3066\u3088\u3046\u3002\u3000<\/p>\n\n\n\n<p>\u53c2\u8003 <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/CORS\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/CORS<\/a><\/p>\n\n\n\n<p>\u5358\u7d14\u306a\u30b5\u30fc\u30d0\u30fc\u306e\u7acb\u3066\u65b9<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"python3 -m http.server\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #88C0D0\">python3<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">-m<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #A3BE8C\">http.server<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>getUserMedia\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u90fd\u5408\u4e0a\u3001HTTPS\u74b0\u5883\u3067\u306a\u3044\u3068\u4f7f\u3048\u306a\u3044\u3002\u30ed\u30fc\u30ab\u30eb\u3067\u8a66\u3057\u305f\u3044\u3068\u304d\u306f\u30aa\u30ec\u30aa\u30ec\u8a3c\u660e\u66f8\uff0bpython HTTPS\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u304a\u3046<\/p>\n\n\n\n<p>\u53c2\u8003 <a href=\"https:\/\/www.lifewithpython.com\/2021\/03\/python-https-server.html\">https:\/\/www.lifewithpython.com\/2021\/03\/python-https-server.html<\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h4 class=\"wp-block-heading\">Web Audio API\u306b\u3064\u3044\u3066<\/h4>\n\n\n\n<p>\u30d5\u30a3\u30eb\u30bf\u30fc\u3068\u30d5\u30a3\u30eb\u30bf\u30fc\u3092\u30e2\u30b8\u30e5\u30e9\u30fc\u30b1\u30fc\u30d6\u30eb\u3067\u3064\u306a\u3044\u3067\u97f3\u3092\u4f5c\u308b\u30a2\u30ca\u30ed\u30b0\u30b7\u30f3\u30bb\u30b5\u30a4\u30b6\u30fc\u3092\u30a4\u30e1\u30fc\u30b8\u3059\u308b\u3068\u308f\u304b\u308a\u3084\u3059\u3044\u3002<\/p>\n\n\n\n<p>AudioContext\u3068\u3044\u3046\u30b7\u30f3\u30bb\u30b5\u30a4\u30b6\u30fc\u306e\u4e2d\u3067\u3001\u5165\u529b\uff08AudioSourceNode)\u304b\u3089\u3044\u304f\u3064\u304b\u306e\u30d5\u30a3\u30eb\u30bf\u30fc\u306e\u305f\u3081\u306e\u30ce\u30fc\u30c9\uff08ConvolverNode\u306a\u3069\uff09\u3092\u7d4c\u7531\u3057\u3066\u3001\u51fa\u529b\uff08AudioDestinationNode)\u3078\u3068\u7e4b\u3050\uff08connect)\u3053\u3068\u3067\u3001\u97f3\u304c\u6d41\u308c\u308b<\/p>\n\n\n\n<p>ConvolverNode\u306e\u30d0\u30c3\u30d5\u30a1\u30fc\u3082\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u3068\u540c\u69d8\u306a\u5f62\u3067\u8aad\u307f\u8fbc\u3080\u3002\u3053\u3053\u3067\u8aad\u307f\u8fbc\u3080\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u3068\u306f\u3001\u6709\u9650\u30a4\u30f3\u30d1\u30eb\u30b9\u5fdc\u7b54\u30d5\u30a3\u30eb\u30bf\u306e\u30c7\u30fc\u30bf\u306e\u3053\u3068\u3067\u3001\u5e73\u305f\u304f\u8a00\u3048\u3070\u3001\u30b3\u30f3\u30b5\u30fc\u30c8\u30db\u30fc\u30eb\u3067\u624b\u3092\uff11\u56de\u6253\u3063\u305f\u3068\u304d\u306e\u53cd\u97ff\u97f3\u3092\u9332\u97f3\u3057\u305f\u3082\u306e\u3002\u3053\u308c\u3092\u5165\u529b\u97f3\u58f0\u3068\u305f\u305f\u307f\u8fbc\u307f\uff08\u3068\u8a00\u3046\u540d\u524d\u306e\u7a4d\u5206\uff09\u3059\u308b\u3053\u3068\u3067\u97f3\u58f0\u306b\u69d8\u3005\u306a\u30d5\u30a3\u30eb\u30bf\u3092\u304b\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u79c1\u306e\u5834\u5408\u306f\u3001SOFA\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u5f97\u3089\u308c\u305f\u982d\u90e8\u4f1d\u9054\u95a2\u6570\u306b\u306a\u308b\u3093\u3060\u3051\u3069\u3001\u3053\u306e\u8a71\u306f\u307e\u305f\u3044\u3064\u304b\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h4 class=\"wp-block-heading\">Media Capture and Streams API \u306b\u3064\u3044\u3066<\/h4>\n\n\n\n<p>MediaStream\u306e\u7ba1\u8f44\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306fEventTarget\u3092\u7d99\u627f\u3057\u3066\u3044\u308b\u3002\u305d\u306e\u305f\u3081\u3001stop\u3084dataavailable\u306a\u3069\u3068\u3044\u3063\u305f\u30a4\u30d9\u30f3\u30c8\u3092\u6301\u3063\u3066\u3044\u308b\u3002\u3053\u308c\u3089\u3092\u4f7f\u3063\u3066\u52d5\u4f5c\u3092\u5236\u5fa1\u3067\u304d\u308b\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<h4 class=\"wp-block-heading\">\u540c\u671f\u30fb\u975e\u540c\u671f\u51e6\u7406\u306b\u3064\u3044\u3066<\/h4>\n\n\n\n<p>fetch()\u306a\u3069\u306e\u51e6\u7406\u306f\u3001\u6642\u9593\u304c\u304b\u304b\u308b\u3002<\/p>\n\n\n\n<p>JavaScript\u306e\u74b0\u5883\u3067\u306f\u3001\u6642\u9593\u304c\u304b\u304b\u308b\u51e6\u7406\u3092\u884c\u3046\u95a2\u6570\u306fPromise\u3068\u3044\u3046\u201d\u7d04\u675f\u624b\u5f62\u201d\u3092\u8fd4\u3059\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"var file = fetch(url);\nconsole.log(file);  \/\/ Promise{..}\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">var<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">file<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">fetch<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">url<\/span><span style=\"color: #D8DEE9FF\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">console<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">log<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">file<\/span><span style=\"color: #D8DEE9FF\">)<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/\/ Promise{..}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u305d\u306e\u305f\u3081\u3001\u53d7\u3051\u53d6\u3063\u305f\u306f\u305a\u306e\u73fe\u91d1\uff08\u5b9f\u306f\u7d04\u675f\u624b\u5f62\uff09\u3092\u3059\u3050\u306b\u4f7f\u304a\u3046\u3068\u3059\u308b\u3068\u578b\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"var file = fetch(url);\nfile.arrayBuffer();  \/\/ Uncaught TypeError: file.arrayBuffer is not a function\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">var<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">file<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">fetch<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">url<\/span><span style=\"color: #D8DEE9FF\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">file<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">arrayBuffer<\/span><span style=\"color: #D8DEE9FF\">()<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/\/ Uncaught TypeError: file.arrayBuffer is not a function<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u89e3\u6c7a\u65b9\u6cd5\u306f\u5358\u7d14\u306b\u3001\u91d1\u304c\u7528\u610f\u3055\u308c\u308b\u307e\u3067\u3001\u30c9\u30a2\u3092\u53e9\u3044\u3066\u5f85\u3063\u3066\u3044\u308c\u3070\u3044\u3044\u3002<\/p>\n\n\n\n<p>\u547c\u3073\u51fa\u3059\u5143\u306e\u95a2\u6570\u306b\u306fasync\uff08\u975e\u540c\u671f\uff09\u3001\u547c\u3073\u51fa\u3059\u95a2\u6570\u306b\u306fawait\uff08\u5f85\u3064\uff09\u3060\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"async function getArrayBuf(url) {  \/\/ await\u3092\u4f7f\u3046\u95a2\u6570\u3067\u306fasync\u3092\u4f7f\u3046\n  var file = await detch(url);\n  return file.arrayBuffer();  \/\/ \u4eca\u5ea6\u306f\u30a8\u30e9\u30fc\u306f\u51fa\u306a\u3044\u3002\n  }\n  \nvar buf = awaitgetArrayBuf(Url);  \/\/ \u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3068\u304d\u3082await\u3092\u3064\u3051\u308b\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">async<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">function<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">getArrayBuf<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #D8DEE9\">url<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/\/ await\u3092\u4f7f\u3046\u95a2\u6570\u3067\u306fasync\u3092\u4f7f\u3046<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #81A1C1\">var<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">file<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">await<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">detch<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">url<\/span><span style=\"color: #D8DEE9FF\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #81A1C1\">return<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">file<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #88C0D0\">arrayBuffer<\/span><span style=\"color: #D8DEE9FF\">()<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/\/ \u4eca\u5ea6\u306f\u30a8\u30e9\u30fc\u306f\u51fa\u306a\u3044\u3002<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">var<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">buf<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">awaitgetArrayBuf<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #D8DEE9\">Url<\/span><span style=\"color: #D8DEE9FF\">)<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #616E88\">\/\/ \u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3068\u304d\u3082await\u3092\u3064\u3051\u308b<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u6b20\u70b9\u306f\u3001\u30c9\u30a2\u306e\u524d\u3067\u5f35\u308a\u4ed8\u304d\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u3067\u3001\u3053\u306e\u9593JavaScript\u30a4\u30f3\u30bf\u30d7\u30ea\u30bf\u306f\u4ed6\u306e\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u3002\u305d\u306e\u305f\u3081\u3001\u30da\u30fc\u30b8\u306e\u63cf\u753b\u3084UI\u306e\u53cd\u5fdc\u3092\u6b62\u3081\u3066\u3057\u307e\u3046\u3053\u3068\u3060\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067Promise\u306b\u306fthen\u3084\u3089resolve\u306a\u3069\u3001\u73fe\u91d1\u304c\u7528\u610f\u3067\u304d\u305f\u3068\u304d\u306e\u51e6\u7406\u3092\u66f8\u3044\u3066\u7f6e\u304f\u305f\u3081\u306e\u4ed5\u7d44\u307f\u304c\u5b58\u5728\u3059\u308b\u3002\u3057\u304b\u3057\u3001\u79c1\u306f\u3044\u307e\u3044\u3061\u4f7f\u3044\u3053\u306a\u305b\u306a\u3044\u305f\u3081\u3001\u8aac\u660e\u3057\u306a\u3044\u3002<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u308c\u306f\u4f55\uff1f \u97f3\u58f0\u51e6\u7406\u3092\u3059\u308bWeb\u30a2\u30d7\u30ea\u3092\u4f5c\u308b\u4e0a\u3067\u3001\u6b32\u3057\u304f\u306a\u308b\u60c5\u5831\u3092\u307e\u3068\u3081\u305f\u3002 \u4f55\u304c\u3057\u305f\u3044\u306e\uff1f \u97f3\u58f0\u3092\u30de\u30a4\u30af\u3067\u9332\u97f3\u3057\u305f\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3093\u3060\u308a\u3057\u305f\u97f3\u58f0\u30c7\u30fc\u30bf\u3092\u3001\u4f55\u3089\u304b\u306e\u97f3\u58f0\u51e6\u7406\uff08\u30d5\u30a3\u30eb\u30bf\u30fc\uff09\u3092\u9069\u7528\u3057\u3066\u3001\u305d\u306e\u51fa\u529b\u3092\u30d5\u30a1\u30a4\u30eb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[8,10,11],"_links":{"self":[{"href":"https:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/122"}],"collection":[{"href":"https:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=122"}],"version-history":[{"count":10,"href":"https:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions"}],"predecessor-version":[{"id":134,"href":"https:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/122\/revisions\/134"}],"wp:attachment":[{"href":"https:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arei1126.ddns.net\/mozihakkou\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}