See #17798
}
  }
  function prepareViewAttributeSource(
    id: number,
    path: Array<string | number>,
  ): void {
    const inspectedElement = inspectElementRaw(id);
    if (inspectedElement !== null) {
      window.$attribute = getInObject(inspectedElement, path);
    }
  }
  function prepareViewElementSource(id: number): void {
    const internalInstance = idToInternalInstanceMap.get(id);
    if (internalInstance == null) {
      console.warn(`Could not find instance with id "${id}"`);
      return;
    }
    const element = internalInstance._currentElement;
    if (element == null) {
      console.warn(`Could not find element with id "${id}"`);
      return;
    }
    global.$type = element.type;
  }
  function setInProps(id: number, path: Array<string | number>, value: any) {
    const internalInstance = idToInternalInstanceMap.get(id);
    if (internalInstance != null) {
      const element = internalInstance._currentElement;
      internalInstance._currentElement = {
        ...element,