問題タブ [documentfragment]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - Safari での documentFragment.querySelector の問題
documentFragment
javascriptquerySelector
メソッドを使用して要素を取得しようとしています。
Chrome と Firefox では期待どおりの結果が得られますが、Safari (Mac OS、Safari 12.0.2) ではそうではありません。
jsFiddle: https://jsfiddle.net/bwqvrex2/
何か足りないのですか、それとも単なるバグですか?
javascript - documentFragment で document.elementFromPoint を使用する
documentFragment内のどこかの要素を指す point(x,y) にdocument.elementFromPointを適用すると、コンテナー要素が返されます。例えば:
期待される結果: (x,y) が#my_documentfragmentを指している場合、document.elementFromPoint(x,y) は#my_documentfragmentを返す必要があります。
実際の結果: #containerを 返します。ドキュメントフラグメントのコンテナ
- ページの一部が documentFragments の場合、document.elementFromPoint(x,y) に代わるものは何ですか?
- documentFragment の一部である要素の jquery.parents() に代わるものは何ですか