最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Working with jscontroller property with google products - Stack Overflow

programmeradmin8浏览0评论

I was trying to create a google chrome extension for google meet, so I looked to the html code of Meet, and I saw a lot of property like jsaction="data"; jscontroller="data"; jsname="data"; jsmodel="data".

The property id="data" never appears, so I don't know how to use js to find elements with a given id (document.getElementById("data")), so I think I have to work with that weird properties.

I tried to google for them, but I wasn't able to find anything useful. Does anyone know what they are, and how to work with them?

Thanks in advance.

I was trying to create a google chrome extension for google meet, so I looked to the html code of Meet, and I saw a lot of property like jsaction="data"; jscontroller="data"; jsname="data"; jsmodel="data".

The property id="data" never appears, so I don't know how to use js to find elements with a given id (document.getElementById("data")), so I think I have to work with that weird properties.

I tried to google for them, but I wasn't able to find anything useful. Does anyone know what they are, and how to work with them?

Thanks in advance.

Share Improve this question asked Nov 13, 2020 at 17:33 DevmikiDevmiki 791 silver badge6 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

jscontroller, jsmodel, jsaction, etc. are part of Google's code library. (They're relatively unknown to those who don't work at Google.)

If you just want to find the HTML element, you can access those elements with something like

document.querySelector("[jscontroller="+data+"]") 

(You can substitute jscontroller with any other element attribute.)

This uses the [attribute=value] css selector, which you can read more about here.

发布评论

评论列表(0)

  1. 暂无评论