#shadow-root(open) #document shadowRoot

Quick Edit Pencil

Element.shadowRoot

shadowRootのスタイルをいじる

/*shadow-root商品説明*/
var descriptionOfItem = document.querySelector("mer-show-more");
var content = descriptionOfItem.shadowRoot.querySelector(".clamp");
content.setAttribute("style", "-webkit-line-clamp: none");
var button = descriptionOfItem.shadowRoot.querySelector(".show-more-button");
button.setAttribute("style", "display: none");
var itemName = document.querySelector("mer-item-object");
itemName = itemName.shadowRoot.querySelector(".container").getAttribute('aria-label');
for (var i = 0; i < itemName.length; i++) {
  /*商品メイン画像のシャドウルート内の要素を非表示/削除*/
  if(itemName[i].shadowRoot.querySelector(".sticker")){
  console.log(itemName[i].shadowRoot.querySelector(".sticker"));
  itemName[i].shadowRoot.querySelector(".sticker").setAttribute("style", "display:none;");
  }
}

このブログの人気の投稿

カルチャーラジオ 日曜カルチャー「人間を考える 思いを伝えることば」

googleのキャシュは廃止されたんだ

簡単 らじるらじるの聴き逃し番組、NHKラジオのストリーミングを保存・ダウンロードする方法 2019

書字方向 横書方向変換スクリプト 左書きから右書きへ(コピペ用途)

エラーを解決 再解析ポイントバッファーにあるタグは無効です。

ブックマークレット DOM ソース変更

memo: ショートカットファイルを直接削除する

blender4.1 レンダリング画像を左右反転する方法