Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
iframe ドキュメントの要素で WebKit の window.getMatchedCSSRules を使用して、一致するスタイル (iframe ドキュメントで定義/ソース) を見つけることは可能ですか? これを試してみると、親ドキュメントの一致するスタイルを取得するだけです。別の解決策はありますか?
を使用する代わりに、フレーム化された要素window.getMatchedCSSRulesで使用frame.contentWindow.getMatchedCSSRulesします (例: フレームは である可能性があります$('iframe').get(0)) 。
window.getMatchedCSSRules
frame.contentWindow.getMatchedCSSRules
$('iframe').get(0)