Slater New
« back to Blog

Function sharing across files

Jared Malan
Director Of Technology
 @
Edgar Allan

Have you built a Webflow project with WF Localization? Is it working for you? Slater support for WF Localization has been a common request, so we now support it. If you have a Webflow project with Localization, give it a try.

Next, we are exploring how to support code sharing across files. Currently, we are binding functions to the window object, but that solution has some downsides. With the work we are doing on the next version of edgarallan.com, function sharing across files is becoming increasingly important to us.

Let's take a look at some new scripts in the community library.

Community library scripts

Bind function to window object
Defines an empty global function to use in separate files. This is the current function sharing solution we use.

Save data to localStorage
Set localStorage Store an array of surfer names in localStorage as a JSON string.

Retrieve data from localStorage
Retrieve and parse surfers data from localStorage.

Try it out for yourself

Sign up for a free trial and see if Slater is for you.

Share this post

We are building a first-class development experience that bridges together code and no-code.