question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

object-oriented initialization API, without jQuery

See original GitHub issue

issue description by @arshaw:

Eventually I want to move away from depending on jQuery and have an initialization look something like this:

var calendar = new FullCalendar({/* options */});
calendar.setOption('name', 'val');
calendar.render(containerEl);

issue description by @bkdotcom:

I’m dynamically setting options… https://fullcalendar.io/docs/utilities/dynamic_options/

a) It seems that options can’t be set until fullcalendar is initialized (ie $("#myCalendar").fullcalendar(); // now I can set options b) setting (at least certain) options causes fullcalendar to refetch events

nutshell: it’s currently tricky to initialize fullcalendar with dynamic options.

It’d be nice to have an init callback that could be utilized for such initial setting/configuration… perhaps the callback could/should return a promise object?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
alex-barbericommented, Jun 12, 2017

+1 for using less jQuery. Angular is the big thing right now and it doesn’t play well with jQuery.

3reactions
arshawcommented, Mar 20, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I instantiate JS API objects without calling constructor?
@DerekHenderson new creates an instance derived from the prototype, and initialises it by calling the constructor on it - the very definition of ......
Read more >
Object initializer - JavaScript - MDN Web Docs - Mozilla
An object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in...
Read more >
JavaScript Object initializer - GeeksforGeeks
This same concept is applied in programming and is known as Object Oriented Programming. JavaScript objects can be initialized in various ways ...
Read more >
Tableau JavaScript API Concepts--Initializing the API
Initialize the API. The Tableau JavaScript API uses an object model. The entry point into the object model is to instantiate a new...
Read more >
Understanding Classes in JavaScript | DigitalOcean
JavaScript is a prototype-based language, and every object in JavaScript has a hidden internal property called [[Prototype]] that can be ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found