CoreFlex.Razor.JsInterop
0.1.5
dotnet add package CoreFlex.Razor.JsInterop --version 0.1.5
NuGet\Install-Package CoreFlex.Razor.JsInterop -Version 0.1.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CoreFlex.Razor.JsInterop" Version="0.1.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreFlex.Razor.JsInterop" Version="0.1.5" />
<PackageReference Include="CoreFlex.Razor.JsInterop" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CoreFlex.Razor.JsInterop --version 0.1.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CoreFlex.Razor.JsInterop, 0.1.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CoreFlex.Razor.JsInterop@0.1.5
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CoreFlex.Razor.JsInterop&version=0.1.5
#tool nuget:?package=CoreFlex.Razor.JsInterop&version=0.1.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Core Flex JS 工具模块
提供系统常用的JS互操作的封装,便于使用。
使用
添加CoreFlexRazorJsInteropModule模块依赖
封装Api
CookieJsInterop
提供:
GetAllCookiesAsync获取所有CookieAddCookieAsync添加Cookie`
LocalStorageJsInterop
提供:
SetLocalStorageAsync: 设置LocalStorage的值GetLocalStorageAsync: 获取LocalStorage的值RemoveLocalStorageAsync: 移除LocalStorage的值RemovesLocalStorageAsync: 批量删除Key的LocalStorageClearLocalStorageAsync: 清空LocalStorage的值IsLocalStorageSupportedAsync: 判断浏览器是否支持LocalStorageGetLocalStorageKeysAsync: 获取LocalStorage的所有KeyContainKeyAsync: 判断sessionStorage中是否存在某个key
SessionStorageJsInterop
提供:
SetSessionStorageAsync: 设置SessionStorage的值GetSessionStorageAsync: 获取SessionStorage的值RemoveSessionStorageAsync: 移除SessionStorage的值RemovesSessionStorageAsync: 批量删除Key的SessionStorageClearSessionStorageAsync: 清空SessionStorage的值GetSessionStorageLengthAsync: 获取 sessionStorage 中值的数量ContainKeyAsync: 判断 sessionStorage 中是否含有某个键名
WindowJsInterop
提供以下功能:
CreateBlobURLAsync: 使用 blob 创建 Blob UrlCreateBlobURLFromUint8ArrayAsync: 使用 byte[] 创建一个 Blob 对象URLCreateBlobURLFromStringAsync: 使用 Base64 创建一个 Blob 对象的URLRevokeUrlAsync: 释放 Blob 对象的 URLRevokeUrlsAsync: 批量释放 Blob 对象的 URLGetScrollPositionAsync: 获取滚动条位置SetScrollPositionAsync: 修改滚动条位置GetScrollHeightAsync: 获取滚动条高度ScrollToBottomAsync: 滚动到底部ScrollToTopAsync: 滚动到顶部CopyToClipboardAsync: 复制到剪贴板PlayTextAsync: 播放文本PauseSpeechAsync: 暂停播放语音ResumeSpeechAsync: 继续语音播放StopSpeechAsync: 停止语音播放EnterFullscreenAsync: 进入全屏模式ExitFullscreenAsync: 退出全屏模式IsFullscreenAsync: 判断当前是否处于全屏模式ToggleFullscreenAsync: 切换全屏模式PickContactAsync: 使用 Contact Picker API 选择联系人GetLocationAsync: 获取当前locationSetLocationHrefAsync: 设置当前location hrefGoBackAsync: 返回上一页
DocumentJsInterop
提供以下功能:
ClickDocumentAsync: 触发点击事件ClickElementAsync: 触发元素点击事件GetElementByIdAsync: 获取元素HasElementByIdAsync: 判断是否存在某个元素
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- CoreFlex.Module (>= 0.1.5)
- Microsoft.AspNetCore.Components.Web (>= 6.0.0)
-
net7.0
- CoreFlex.Module (>= 0.1.5)
- Microsoft.AspNetCore.Components.Web (>= 7.0.0)
-
net8.0
- CoreFlex.Module (>= 0.1.5)
- Microsoft.AspNetCore.Components.Web (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.