Possible to get top level notebook name?

Is it possible to get the name of the “top level” or at least “calling” notebook in an imported one? I am writing a utility notebook to read and save form inputs from LocalStorage but would be nice to default the key to something.

new URL(document.baseURI).pathname will give you the notebook URL, and location.hostname the sandbox domain. Example from a d3 notebook:

2 Likes