expose init function in JS API

David Baumgold's Avatar

David Baumgold

16 Oct, 2013 09:35 PM

Right now, Tender runs on page load, and it expects that the page has set any necessary configuration on the `window.Tender` object before the initialization function runs. However, when you have a highly asynchronous JS environment, such as one that uses require.js to load Javascript, the page may not be fully constructed by the time that the Tender JS is loaded from the server. It would be nice if Tender exposed an initialization function that could be called at an arbitrary time, so that the developer can load the script immediately but ensure that it gets run at the correct time.

  1. Support Staff 1 Posted by Courtenay on 16 Oct, 2013 09:55 PM

    Courtenay's Avatar

    hey David,

    This is a little difficult for us to do given the way the widget is coded - perhaps dynamically require the tender script in a callback that runs when that page element is loaded? With something like knockout I know you can subscribe to certain elements.

  2. Courtenay closed this discussion on 24 Oct, 2013 06:43 AM.

Discussions are closed to public comments.
If you need help with Tender please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac