Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/renderer/DesktopAPI/webBinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import { isPrototypeUrl, isValidFigjamLink, isValidProjectLink } from "Utils/Com

interface IntiApiOptions {
version: number;
appVersion: string;
fileBrowser: boolean;
}

const API_VERSION = 100;
const API_VERSION = 111;
const APP_VERSION = '999.0.0';
let webPort: MessagePort;
const mainProcessCancelCallbacks: Map<number, () => void> = new Map();

Expand Down Expand Up @@ -78,6 +80,7 @@ const initWebApi = (props: IntiApiOptions) => {

window.__figmaDesktop = {
version: props.version,
appVersion: props.appVersion,
fileBrowser: props.fileBrowser,
postMessage: function (name, args, transferList): void {
console.log("postMessage, name, args, transferList: ", name, args, transferList);
Expand Down Expand Up @@ -477,6 +480,7 @@ const init = (fileBrowser: boolean): void => {

const initWebOptions: IntiApiOptions = {
version: API_VERSION,
appVersion: APP_VERSION,
fileBrowser: fileBrowser,
};

Expand Down
1 change: 1 addition & 0 deletions src/types/Renderer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface Window
WindowEventHandlers {
__figmaDesktop: {
version: number;
appVersion: string;
fileBrowser: boolean;

postMessage(name: string, args?: any, transferList?: Transferable[]): void;
Expand Down