質問編集履歴

2

エラーの表示の訂正

2022/05/13 01:54

投稿

tohma
tohma

スコア46

test CHANGED
File without changes
test CHANGED
@@ -5,14 +5,13 @@
5
5
 
6
6
  コンソールでは下記のようなエラーが表示されています。
7
7
 
8
- Failed to load resource: net::ERR_NAME_NOT_RESOLVED
8
+ Failed to load resource: net::ERR_NAME_NOT_RESOLVED keiko.localscript.js/:1
9
- keiko.local/:1 Uncaught (in promise) Error: The message port closed before a response was received.
9
+ Uncaught (in promise) Error: The message port closed before a response was received. keiko.local/:1
10
- scripts.js?ver=1652403325:7 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
10
+ Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')  scripts.js?ver=1652403325:7
11
- at window.onload (scripts.js?ver=1652403325:7:44)
11
+    at window.onload (scripts.js?ver=1652403325:7:44)
12
12
 
13
- ご指導の程よろしくおねがいします。
14
13
 
15
- なお、当方、wp_enqueue_scriptとwp_enqueue_scriptsの違いもよく理解ていません。
14
+ なお、当方、wp_enqueue_scriptとwp_enqueue_scriptsの違いもよく理解できていませんので、ご指導の程よろしくお願いします
16
15
 
17
16
  ```PHP
18
17
 

1

コンソールのエラー内容について加筆

2022/05/13 01:36

投稿

tohma
tohma

スコア46

test CHANGED
File without changes
test CHANGED
@@ -2,6 +2,14 @@
2
2
  ボタン部分には追加CSSでcss_animationを指定しています。
3
3
  Wordpressのフックの操作がよくわからないので、プレビュー画面では、ボタンをクリックしなくても常にローディング画面が表示されています。
4
4
  ボタン部分をクリックして後にローディング画面を表示したいのですが、PHPからJavascriptを読み込むフックの操作と、DOM操作のコードが上手くかけません。
5
+
6
+ コンソールでは下記のようなエラーが表示されています。
7
+
8
+ Failed to load resource: net::ERR_NAME_NOT_RESOLVED
9
+ keiko.local/:1 Uncaught (in promise) Error: The message port closed before a response was received.
10
+ scripts.js?ver=1652403325:7 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
11
+ at window.onload (scripts.js?ver=1652403325:7:44)
12
+
5
13
  ご指導の程よろしくおねがいします。
6
14
 
7
15
  なお、当方、wp_enqueue_scriptとwp_enqueue_scriptsの違いもよく理解していません。