Manual Console Testing
Copy and paste these commands into the iframe's console (right-click iframe → Inspect Element → Console):
// Check API availability
console.log('API available:', window.thumbnailAPI);
// List all available methods
console.log('Available methods:', Object.keys(window.thumbnailAPI));
// Test: Get canvas state
await window.thumbnailAPI.getCanvasState();
// Test: List layouts
await window.thumbnailAPI.listLayouts();
// Test: List Huggys
await window.thumbnailAPI.listHuggys();
// Test: Load a layout
await window.thumbnailAPI.loadLayout('funCollab');
// Test: Set canvas size
await window.thumbnailAPI.setCanvasSize('1200x675');
// Test: Set background color
await window.thumbnailAPI.setBgColor('#f0f0f0');
// Test: Export canvas
const result = await window.thumbnailAPI.exportCanvas();
console.log('Export successful:', result.success);
console.log('Image data length:', result.dataUrl.length);