AppBarのカスタム領域を取得
現在表示しているアプリのAppBarのカスタム領域を取得します。
構文
atPocket.app.getAppBarSpaceElement();
引数
なし
戻り値
AppBarのカスタム表示領域のDOM要素オブジェクト
使用可能画面
- レコード一覧
- レコード詳細画面
- レコード作成画面
- レコード編集画面
使用例
// AppBarのカスタム領域を取得
const appBarSpace = atPocket.app.getAppBarSpaceElement();
// カスタムボタンを作成
const customButton = document.createElement('button');
customButton.textContent = 'カスタムボタン';
customButton.style.padding = '10px';
customButton.style.backgroundColor = '#007bff';
customButton.style.color = '#ffffff';
customButton.style.border = 'none';
customButton.style.borderRadius = '5px';
customButton.onclick = () => alert('カスタムボタンがクリックされました');
// AppBarの領域にボタンを追加
appBarSpace.appendChild(customButton);
結果画面