In what scenarios the docs about 'The name "class" must be quoted in the object...' are relevant?
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- ドキュメント
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, jquery
調査の方向性
https://api.jquery.com/jquery/ の jquery API ドキュメントページを確認し、"class" の引用符に関する記述を、提供された JavaScript の例およびブラウザーバージョンごとの結果と比較してください。該当するバージョンに対してこのガイダンスが現在も正確かどうかを確認し、そのうえで適用されるシナリオを明確に記載するようドキュメントを更新してください。
索引モデルが issue の本文から書いたものです。
説明
jQuery version: 3.4.1
Hi jQuery docs team!
While I was reformatting some code with an automated tool, I noticed that tool removes the quotes in this kind of code:
// Original code
var $p = $('<p>', {
"class": "b-info", // I am USING quotes for "class"
text: "Appended text"
});
// After passing the formatter
var $p = $('<p>', {
class: 'b-info', // Quotes are removed from "class"
text: "Appended text"
});
So, I went back to jQuery docs in https://api.jquery.com/jquery/ where it is said:
The name "class" must be quoted in the object since it is a JavaScript reserved word, and "className" cannot be used since it refers to the DOM property, not the attribute.
I was wondering if you have identified scenarios/versions where this is RELEVANT.
I did some tests using this minimal code, in:
- Google Chrome: OK
- Safari: OK
- Firefox: OK
- MS Edge: OK
- IE 11: OK
- IE 10 (Emulation): OK
- IE 9 (Emulation): OK
- IE 8 (Emulation): FAILS
- IE 7 (Emulation): FAILS
So, it seems, this code ONLY fails on IE 8 and older versions of that browser, is that correct?
Thanks in advance.
Best regards.
<!doctype html>
<html lang="en">
<body>
<h1>jQuery test</h1>
<p>"Appended text" will be appended. Check your console too!</p>
<script src="./js/jquery-3.4.1.min.js"></script>
<script>
(function($) {
var $p = $('<p>', {
class: 'b-info', // I am not using quotes for "class"
text: 'Appended text'
});
$('body').append($p);
})(jQuery);
</script>
</body>
</html>
- 主要言語
- HTML
- スター
- 324
- フォーク
- 259
- 平均マージ
- 1日 30分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
jquery/api.jquery.com のほかの issue
-
Mention of ‘timestamp’ in documentation for ‘cache’ parameter of ‘ajax’ is misleading対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
jquery/api.jquery.com#1241 · コメント 2 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
jquery/api.jquery.com#1176 ·
-
The documentation of CSS methods should be further classified再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
jquery/api.jquery.com#1281 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
jquery/api.jquery.com#1271 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
jquery/api.jquery.com#1259 ·
jquery/api.jquery.com の issue をすべて見る
似ている issue
-
5-minutes algorithm all-levels any-language beginner-friendly community documentation easy first-timers-only good first issue hacktoberfest help wanted learning no-code-needed open-source python students
難易度 2/5 1時間未満 初心者へのやさしさ 88/100
Huerte/algo-solutions-python#253 ·
メンテナーはふだん 1 日以内に返信
-
size/s
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
sipyourdrink-ltd/bernstein#7179 ·
メンテナーはふだん 1 日以内に返信
-
area/docs
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
meshery/meshery#23375 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Synthetic
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
samtoth/agda-synthetic-categories#373 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
tanaabased/big-test-bucket#19952 ·
メンテナーはふだん 1 日以内に返信