diff --git a/src/api/custom-renderer.md b/src/api/custom-renderer.md index 6303ea14..13989293 100644 --- a/src/api/custom-renderer.md +++ b/src/api/custom-renderer.md @@ -22,24 +22,16 @@ Creates a custom renderer. By providing platform-specific node creation and mani key: string, prevValue: any, nextValue: any, - // the rest is unused for most custom renderers - isSVG?: boolean, - prevChildren?: VNode[], + namespace?: ElementNamespace, parentComponent?: ComponentInternalInstance | null, - parentSuspense?: SuspenseBoundary | null, - unmountChildren?: UnmountChildrenFn - ): void - insert( - el: HostNode, - parent: HostElement, - anchor?: HostNode | null ): void + insert(el: HostNode, parent: HostElement, anchor?: HostNode | null): void remove(el: HostNode): void createElement( type: string, - isSVG?: boolean, + namespace?: ElementNamespace, isCustomizedBuiltIn?: string, - vnodeProps?: (VNodeProps & { [key: string]: any }) | null + vnodeProps?: (VNodeProps & { [key: string]: any }) | null, ): HostElement createText(text: string): HostNode createComment(text: string): HostNode @@ -47,8 +39,6 @@ Creates a custom renderer. By providing platform-specific node creation and mani setElementText(node: HostElement, text: string): void parentNode(node: HostNode): HostElement | null nextSibling(node: HostNode): HostNode | null - - // optional, DOM-specific querySelector?(selector: string): HostElement | null setScopeId?(el: HostElement, id: string): void cloneNode?(node: HostNode): HostNode @@ -56,7 +46,9 @@ Creates a custom renderer. By providing platform-specific node creation and mani content: string, parent: HostElement, anchor: HostNode | null, - isSVG: boolean + namespace: ElementNamespace, + start?: HostNode | null, + end?: HostNode | null, ): [HostNode, HostNode] } ``` diff --git a/src/api/options-state.md b/src/api/options-state.md index b975a50f..4aa176a2 100644 --- a/src/api/options-state.md +++ b/src/api/options-state.md @@ -93,7 +93,7 @@ Declare the props of a component. - **`required`**: Defines if the prop is required. In a non-production environment, a console warning will be thrown if this value is truthy and the prop is not passed. - - **`validator`**: Custom validator function that takes the prop value as the sole argument. In development mode, a console warning will be thrown if this function returns a falsy value (i.e. the validation fails). + - **`validator`**: Custom validator function that takes the prop value and props object as arguments. In development mode, a console warning will be thrown if this function returns a falsy value (i.e. the validation fails). - **Example**