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

What is Framer? Join the Community
Return to index
Isa Bison
Posted Aug 02 - Read on Facebook

Can you pass a reference to the scope to a function in a module? Can you even get a reference to the scope? Or, is there a way to extend the functionality of whatever object is used to constitute? e.g. App::decorateAllLayers = -> for layer in layers ...

From what I understand, the short answer is no, and the medium answer is to make a snippet.

(Ps. This Bison is intentionally trying to enter the china shop and do some unsafe things.)


Krijn Rijshouwer

I am not sure if I understand your question correctly. But it is indeed bad practise to use logic from your executable file in modules. It's better to create another module that contains the desired functionality like 'decorateAllLayers'.

I think the solution you're looking for though would probably be to just bind things to the window so you'll be able to access them anywhere.

Let me know if I understood your question correctly :)

Isa Bison
Read the entire post on Facebook