What does this mean: data-component-bound=“true”?

前端 未结 2 394
不思量自难忘°
不思量自难忘° 2021-01-19 05:20

What does data-component-bound=\"true\" mean?

I\'ve found this within a collapsed element but adjusting the value doesn\'t do anything. I\'ve tried looking for the

相关标签:
2条回答
  • 2021-01-19 05:26

    data- attributes are extensible: the author of the code can make up any data attribute they like. In this case, from a quick look, it seems it is used for the internal workings of websites to know when the 'component' (i.e. DOM element) is 'bound' to something - an event, an interaction, etc.

    In general, data- attributes are used for that: data. They store any data, so are often used to substitute non-standard attributes that would otherwise flag up in a validator.

    0 讨论(0)
  • 2021-01-19 05:35

    HTML data attributes allow you to set custom data for an element. The meaning of data-component-bound is determined by your code or some css or javascript framework that you might be using.

    Search the codebase for 'component-bound' to see if it's being used. If you don't find anything, Google it to see if it's a popular attribute from some framework. If it's not, then you're safe to remove it.

    https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_data_attributes

    0 讨论(0)
提交回复
热议问题