Skip to content

Latest commit

 

History

History
15 lines (9 loc) · 1.48 KB

File metadata and controls

15 lines (9 loc) · 1.48 KB

About the Project

This project is an example of how the IntersectionObserver WebApi can be used in the context of a Blazor Application. The project uses the canhorn/EventHorizon.Blazor.TypeScript.Interop.Generator project tool to generate a Blazor Interop Abstraction around the JavaScript calls that would be used to call Api.

This project is currenlty setup for Blazor Wasm, but the source can be generated to also work in a Blazor server context, checkout the documentation on the canhorn/EventHorizon.Blazor.TypeScript.Interop.Generator Tool README for more details on how to change the Source Generation options.

Commands

You can use the command below to Regenerate the Blazor.WebApi.IntersectionObserver Source code. The IntersectionObserver.d.ts file is a TypeScript Definition of the relevent parts of the IntersectionObserver that can be used in the example project. Checkout the Blazor.WebApi.IntersectionObserver to see the generated source of the below command.

# Generate 
ehz-generate -f -a Blazor.WebApi.IntersectionObserver -s ./GeneratorSource/IntersectionObserver.d.ts -c IntersectionObserver -l Generated