This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Riccardo Buzzotta
Posted Nov 18 - Read on Facebook

Hello all, :)

I'm logging things like:
>>> print Framer.Device.deviceType

Mirroring through Framer/Frameless apps, this info is passed (why?). So my question is: is there a way to discern when I'm outside the Framer Studio context? Thanks~!

3 Comments

Benjamin Den Boer

Hey Lucifero, you could use some of the built-in Utilities to check for this. :-)

if Utils.isDesktop
____print "Desktop"

else if Utils.isMobile
____print "Mobile"

Riccardo Buzzotta

Hi Benjamin Den Boer, thank you for the swift reply. Still not exactly what I'm really looking for, but since I'm focused on smartphones, that's going to do the trick for now.
I just had to to execute the function → if Utils.isDesktop() (with parentheses)

Would be great to have Utils.isFramerStudio ;)

Riccardo Buzzotta

Scrap that… there is! It's exactly Utils.isFramerStudio() :D Not documented though. (Is there a way to contribute to the Docs?)

Read the entire post on Facebook