{"id":26280077,"url":"https://github.com/kristofferstrube/blazor.window","last_synced_at":"2025-05-07T03:04:20.487Z","repository":{"id":230469167,"uuid":"778019622","full_name":"KristofferStrube/Blazor.Window","owner":"KristofferStrube","description":"A Blazor wrapper for the Window interface from the HTML Specification.","archived":false,"fork":false,"pushed_at":"2024-11-18T22:35:26.000Z","size":8827,"stargazers_count":15,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T03:04:12.483Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KristofferStrube.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-26T23:34:49.000Z","updated_at":"2025-04-07T09:09:36.000Z","dependencies_parsed_at":"2024-03-29T23:36:28.000Z","dependency_job_id":"eacad882-c552-43ef-bc71-afabfc791c9f","html_url":"https://github.com/KristofferStrube/Blazor.Window","commit_stats":null,"previous_names":["kristofferstrube/blazor.window"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KristofferStrube%2FBlazor.Window","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KristofferStrube%2FBlazor.Window/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KristofferStrube%2FBlazor.Window/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KristofferStrube%2FBlazor.Window/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KristofferStrube","download_url":"https://codeload.github.com/KristofferStrube/Blazor.Window/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252804206,"owners_count":21806769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-14T14:18:33.598Z","updated_at":"2025-05-07T03:04:20.460Z","avatar_url":"https://github.com/KristofferStrube.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](/LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/KristofferStrube/Blazor.Window)](https://github.com/KristofferStrube/Blazor.Window/issues)\n[![GitHub forks](https://img.shields.io/github/forks/KristofferStrube/Blazor.Window)](https://github.com/KristofferStrube/Blazor.Window/network/members)\n[![GitHub stars](https://img.shields.io/github/stars/KristofferStrube/Blazor.Window)](https://github.com/KristofferStrube/Blazor.Window/stargazers)\n[![NuGet Downloads (official NuGet)](https://img.shields.io/nuget/dt/KristofferStrube.Blazor.Window?label=NuGet%20Downloads)](https://www.nuget.org/packages/KristofferStrube.Blazor.Window/)\n\n# Blazor.Window\nA Blazor wrapper for the [Window interface from the HTML Specification.](https://html.spec.whatwg.org/#the-window-object)\nThis interface standardizes methods for controlling the global object used in browser windows called `Window`. This project implements a wrapper around the interface and its types for Blazor so that we can easily and safely work with all the methods, attributes, and events surfaced in the `Window` interface.\n\nThese functionalities are vast, and we do not wish to support them all, as some of them are of little use or work against the principles of Blazor. Here, I have made a high-level list of the different functionalities that the `Window` interface supplies and marked which this wrapper will cover.\n\n- 🚫 Access to the top level `Document` of the window.\n- ✅ Navigation control for the window.\n- ✅ Option to register WebComponents using the `CustomElementRegistry`.\n- 🚫 Attributes indicating whether toolbar, scrollbars, location bar, etc. are visible.\n- ✅ Access to the parent `WindowProxy` that this window is hosted in/by in case it is in an iframe or is a pop-up window.\n- ✅ Option to open a new window given some URL and target.\n- 🚫 Attributes giving information about the user agent through the `Navigator`.\n- ✅ Initialize alert, confirm, prompt, and print user prompts.\n- ✅ Posting messages to the window and listening for messages sent to it.\n- ✅ Event listeners for events that are triggered when the user interacts with the window, such as mouse clicks, scrolling, resizing, etc.\n- ✅ Event listeners for events related to the actions available in the window, such as changes in internet connectivity, changes in navigation location, or when the page is shown or hidden.\n\n**This wrapper is still under development.**\n# Demo\nThe sample project can be demoed at https://kristofferstrube.github.io/Blazor.Window/\n\nOn each page, you can find the corresponding code for the example in the top right corner.\n\nOn the [API Coverage Status](https://kristofferstrube.github.io/Blazor.Window/Status) page, you can see how much of the WebIDL specs this wrapper has covered.\n\n# Related repositories\nThe library uses the following other packages to support its features:\n- https://github.com/KristofferStrube/Blazor.WebIDL (To make error handling JSInterop)\n- https://github.com/KristofferStrube/Blazor.DOM (`Window` extends `EventTarget`)\n\n# Related articles\nThis repository was built with inspiration and help from the following series of articles:\n\n- [Typed exceptions for JSInterop in Blazor](https://kristoffer-strube.dk/post/typed-exceptions-for-jsinterop-in-blazor/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkristofferstrube%2Fblazor.window","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkristofferstrube%2Fblazor.window","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkristofferstrube%2Fblazor.window/lists"}