developit / developit/undom

"elem.attributes" should include "style" attribute

オープン
#11 コメント 3 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
690
フォーク
25
PR マージ指標
30日以内にマージされた PR はありません

説明

Currently, `elem.attributes` does not include the `style` attribute since that's stored as a separate object. See: https://github.com/developit/undom/blob/master/src/undom.js#L93-L95

This differs from my expectations. It also means that the provided `serializeHtml()` function doesn't include inline styles without modification.

Update: also, `elem.style.cssText` returns an object when a string is expected. Is this level of DOM compliance out-of-scope for `undom` or is this a reasonable expectation?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

src/undom.js の 93-95 行目と、提供されている serializeHtml() の実装から始めます。elem.attributes、インラインスタイル、elem.style.cssText の動作を再現し、その後、これらの API がどのように表現されているかを確認します。DOM 準拠の意図された範囲が明確になり、報告されたスタイルの動作が一貫してカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
frontend, web-dev
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
32/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。