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

What is Framer? Join the Community
Return to index
Gregory J. Orton
Posted Aug 02 - Read on Facebook

I have a request: there seems to be a huuuuuuge number of 'undocumented' functions / features in Framer JS that either the framer team have not got around to doing, or they just assumed people know (if they're pr0 JSers, or don't need). An example is from another post here from about 2 months ago:

"There's an undocumented Utils.textSize(layer.html, styles, constraints)."

(it's definitely not documented here: http://framer.com/docs/#utils.utilities)

and I have used this in my projects:

"json = Utils.domLoadDataSync 'someJSONFile.json'
layerA.html = json.someProperty"

I understand that Framer is coffeescript compiling to JS and running as HTML + CSS + JS inside a container so it has access to basically ALL of what JS and HTML have to offer, but there are limitations, for example binding event listeners:

"layer.player.on "ended", ->
..."
doesn't work

where

"layer.player.addEventListener "ended", ->
..."

does work.

Anybody else have any cool 'undocumented' features / tools that they'd like to share?

3 Comments

Jordan Robert Dobson

Just look at Utils file on github

Sigurd Tapio Mannsåker

Yeah as Gregory J. Orton mentioned, it's worth poking around the GitHub repo. I know it can seem a bit daunting for a lot of designers (it was for me at first) but it's often instructive to see how the different classes and components work under the hood

Koen Bok

We do this on purpose. If we don't document things, we don't consider them usable for a large audience yet. You can always try them out, but you're on your own :-)

Read the entire post on Facebook