melonjs
    Preparing search index...

    Function setOptions

    • Sets the options for the loader.

      Parameters

      • options: { crossOrigin?: string; nocache?: boolean; withCredentials?: boolean }

        The options to set.

        • OptionalcrossOrigin?: string

          The crossOrigin attribute to configure the CORS requests for Image and Video data element.

        • Optionalnocache?: boolean

          Enable or disable the nocache mechanism.

        • OptionalwithCredentials?: boolean

          Indicates whether or not cross-site Access-Control requests should be made using credentials.

      Returns void

      loader

      // Set the crossOrigin attribute to "anonymous"
      me.loader.setOptions({ crossOrigin: "anonymous" });

      // Enable the nocache mechanism
      me.loader.setOptions({ nocache: true });

      // Enable withCredentials
      me.loader.setOptions({ withCredentials: true });