### ks.canIUse(schema: string): boolean Source: https://open.kuaishou.com/docs/develop/api-next/basic/ks.canIUse Checks if a specific API, callback, parameter, or component attribute is available in the current environment. ```APIDOC ## ks.canIUse(schema: string) ### Description Determines whether a specific mini-program API, callback, parameter, or component is available in the current version. This is essential for maintaining compatibility with lower versions of the base library. ### Parameters #### Path Parameters - **schema** (string) - Required - The feature to check, formatted as `${API}.${method}.${param}.${option}` or `${component}.${attribute}.${option}`. ### Response #### Success Response (boolean) - Returns `true` if the feature is available, `false` otherwise. ### Request Example ```javascript // Check API methods ks.canIUse('console.log'); // Check API parameters or return values ks.canIUse('getSystemInfoSync.return.safeArea.left'); // Check component attributes ks.canIUse('text.selectable'); ``` ``` -------------------------------- ### Check API/Component Availability Source: https://open.kuaishou.com/docs/develop/api-next/basic/ks.canIUse Use this function to determine if an API, its parameters, callbacks, or component attributes are available in the current mini-program version. Ensure compatibility by checking before using features that might not be supported on older clients. ```javascript ks.canIUse('console.log'); ``` ```javascript ks.canIUse('CameraContext.onCameraFrame'); ``` ```javascript ks.canIUse('CameraFrameListener.start'); ``` ```javascript ks.canIUse('getSystemInfoSync.return.safeArea.left'); ``` ```javascript ks.canIUse('getSystemInfo.success.screenWidth'); ``` ```javascript ks.canIUse('showToast.object.image'); ``` ```javascript ks.canIUse('onCompassChange.callback.direction'); ``` ```javascript ks.canIUse('request.object.method.GET'); ``` ```javascript ks.canIUse('text.selectable'); ``` ```javascript ks.canIUse('button.open-type.contact'); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.