legacy-knowledge-base
公開されました Jul. 2, 2025

jQueryにパッシブリスナーを追加する

written-by

Antonio Ortega

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • Google Pagespeed で監査を実行すると、jQueryのパッシブリスナーの実装に関する推奨事項を見つけることが一般的です。 どうすればいいのでしょうか。

Environment

  • Liferay DXP(バージョン不問)

解決策

  • jQueryは非推奨であり、実際にLiferay DXP 7.3からデフォルトで無効になっているため、新しい機能を追加する予定はなく、カスタム開発で実現する必要があります。 そのためには、 /html/common/themes/top_head.jsp#post DynamicIncludeのような拡張ポイントを使用することをお勧めします。
  • LiferayのDynamicInclude拡張ポイントの使い方については、 Top Head JSP Dynamic Includesの記事を読むことをお勧めします。
  • このような場合、どのコードを追加すればよいかを知るために、添付ファイル MyDynamicIncludeJQuery.javaをご覧になることをお勧めします。 このファイルは、最終的な解決策ではなく、参考資料としてお考えください。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base