Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * ProductameSearchPanel
- *
- * @link https://developer.lucid.co/extension-api/#hard-refresh-action#persistent-panels
- * @link https://developer.lucid.co/extension-api/#communicating-with-custom-ui
- * @access public
- */
- class ProductameSearchPanel extends Panel {
- /**
- * (constructor)
- *
- * @access private
- * @param EditorClient client
- * @return void
- */
- constructor(client: EditorClient) {
- super(client, {
- title: 'Productame',
- content: getContent(),
- iconUrl: 'https://example.com/favicon-96x96.png',
- location: PanelLocation.ImageSearchTab,
- // location: PanelLocation.RightDock,
- width: 280,
- persist: true
- });
- // console.log('meow', window.Productame);
- }
- /**
- * sendUserIdToFrame
- *
- * @access private
- * @return void
- */
- private async sendUserIdToFrame() {
- this.sendMessage({
- userId: 'qqq'
- });
- // var userId = user.id;
- // this.sendMessage({
- // action: 'receiveUserId',
- // paylod: {
- // userId: userId
- // }
- // });
- }
- /**
- * messageFromFrame
- *
- * From docs:
- * "When the app is loaded, it will send a message asking for an update."
- *
- * @access protected
- * @param String message
- * @return void
- */
- protected async messageFromFrame(message: any) {
- var action = message.action || null;
- if (action === 'getUserId') {
- this.sendUserIdToFrame();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement