MCPcopy Index your code
hub / github.com/plotly/dash / hook_index

Function hook_index

tests/integration/test_hooks.py:146–151  ·  view source on GitHub ↗
(index: str)

Source from the content-addressed store, hash-verified

144def test_hook007_hook_index(hook_cleanup, dash_duo):
145 @hooks.index()
146 def hook_index(index: str):
147 body = "<body>"
148 ib = index.find(body) + len(body)
149 injected = '<div id="hooked">Hooked</div>'
150 new_index = index[ib:] + injected + index[: ib + 1]
151 return new_index
152
153 app = Dash()
154 app.layout = html.Div(["index"])

Callers

nothing calls this directly

Calls 1

findMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…