simonwep / pickr

🎨 Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
https://simonwep.github.io/pickr
MIT License
4.31k stars 284 forks source link

Error - Property 'app' does not exist on type 'object'. #320

Closed ghost closed 5 months ago

ghost commented 1 year ago

What is the current behavior?

For following

const pickrApp = pickr.getRoot().app;

Getting error

Property 'app' does not exist on type 'object'.

image

Please provide the steps to reproduce and create a JSFiddle.

What is the expected behavior?

There should a function to get app.

const pickr = pickr.getApp()

Your environment:

Version (see Pickr.version):
Used bundle (es5 or normal one):
Used theme (default is classic): 
Browser-version:  
Operating-system:  
simonwep commented 5 months ago

You must wait for the init event to access the DOM.