object-oriented initialization API, without jQuery
See original GitHub issueissue 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:
- Created 6 years ago
- Reactions:6
- Comments:12 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 for using less jQuery. Angular is the big thing right now and it doesn’t play well with jQuery.
V4 was officially released a few days ago!