The Load() event of the Search widget is nerver called?

1266
4
05-09-2017 11:22 AM
MartinOuellet2
New Contributor

This piece of code (taken from the 4.3 doc #) is never called

searchWidget.on("load", function (evt) {
   console.log("Search widget has loaded!");
});

any thoughts?

Tags (2)
0 Kudos
4 Replies
PhilLarkin1
Occasional Contributor III

That is interesting.

I tried wrapping the widget creation, event registration in a timeout. Didn't help:

JS Bin - Collaborative JavaScript Debugging 

0 Kudos
by Anonymous User
Not applicable

Hello martin,

There is an event which is not loading properly. If still the console log is required, fire the statement without on load event. It will work. what I mean to say is

original text-

searchWidget.on("load", function (evt) {    console.log("Search widget has loaded!"); });

 

Replace it with- 

console.log("Search widget has loaded!");

Without event

0 Kudos
KellyHutchins
Esri Frequent Contributor

Looks like a bug with the Search widget. We'll get it fixed for the next release of the API. 

KristianEkenes
Esri Regular Contributor

The load event never actually existed on the Search widget. This was a documentation error that will be removed at 4.4.