I am trying to get a grip on how to develop OracleJET projects on my own, from scratch and was trying to figure out:
require(['ojs/ojcore', 'knockout', 'jquery', 'ojs/ojknockout', 'ojs/ojmodule', 'ojs/ojbutton', 'ojs/ojtoolbar', 'ojs/ojmenu'], // add additional JET component modules as needed
function (oj, ko, $) // this callback gets executed when all required modules are loaded
{
function DemoViewModel() {
}
$(document).ready(
function ()
{
ko.applyBindings(new DemoViewModel());
}
);
}
);
I found, from an internet search that "ready" is a jQuery handler method. I found the jQuery ready page (https://api.jquery.com/ready/) and see that the form $(document).ready(handler) is deprecated, that $(handler) should be used.
So, should this code in main.js be updated to:
require(['ojs/ojcore', 'knockout', 'jquery', 'ojs/ojknockout', 'ojs/ojmodule', 'ojs/ojbutton', 'ojs/ojtoolbar', 'ojs/ojmenu'], // add additional JET component modules as needed
function (oj, ko, $) // this callback gets executed when all required modules are loaded
{
function DemoViewModel() {
}
$(
function ()
{
ko.applyBindings(new DemoViewModel());
}
);
}
);