Dash Python by plot.ly 回调,以及 Web 应用程序中的属性和属性

Dash Python by plot.ly callbacks, and Attributes and Properties in web applications

在 Dash 中,通过回调中的 Plotly 帮助部分 https://dash.plotly.com/interactive-graphing 指出:

Dash components are described declaratively by a set of attributes. All of these attributes can be updated by callback functions

使用What is the difference between properties and attributes in HTML?的定义:

说 Dash 回调通过其 id 检索特定的 DOM 对象是合乎逻辑且合理的,并且 'read' 它的 属性 (不是 HTML 属性初始化它)。示例:可以让输入回调监听图形 'hoverData' 更改 属性.

如果这个假设成立:

所以基本上 dash 回调在 DOM 初始化后运行,它们同样在 DOM 属性而不是 HTML 属性上运行。

因此,如果情况属实,这可以在文档中明确说明,这将改进以避免开发人员混淆这些有时不是很明显的术语。

已找到答案,破折号回调与 DOM 属性一起使用,这比说 HTML 属性更准确。