CoreFlex.Razor.JsInterop 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package CoreFlex.Razor.JsInterop --version 0.1.0
NuGet\Install-Package CoreFlex.Razor.JsInterop -Version 0.1.0
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.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CoreFlex.Razor.JsInterop --version 0.1.0
#r "nuget: CoreFlex.Razor.JsInterop, 0.1.0"
#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.
// Install CoreFlex.Razor.JsInterop as a Cake Addin
#addin nuget:?package=CoreFlex.Razor.JsInterop&version=0.1.0

// Install CoreFlex.Razor.JsInterop as a Cake Tool
#tool nuget:?package=CoreFlex.Razor.JsInterop&version=0.1.0

Core Flex JS 工具模块

提供系统常用的JS互操作的封装,便于使用。

封装Api

CookieJsInterop

提供:

  • GetAllCookiesAsync 获取所有Cookie
  • AddCookieAsync 添加Cookie`

LocalStorageJsInterop

提供:

  • SetLocalStorageAsync 设置LocalStorage的值
  • GetLocalStorageAsync 获取LocalStorage的值
  • RemoveLocalStorageAsync 移除LocalStorage的值
  • RemovesLocalStorageAsync 批量删除Key的LocalStorage
  • ClearLocalStorageAsync 清空LocalStorage的值
  • IsLocalStorageSupportedAsync 判断浏览器是否支持LocalStorage
  • GetLocalStorageKeysAsync 获取LocalStorage的所有Key

SessionStorageJsInterop

提供:

  • SetSessionStorageAsync 设置SessionStorage的值
  • GetSessionStorageAsync 获取SessionStorage的值
  • RemoveSessionStorageAsync 移除SessionStorage的值
  • RemovesSessionStorageAsync 批量删除Key的SessionStorage
  • ClearSessionStorageAsync 清空SessionStorage的值
  • GetSessionStorageLengthAsync 获取 sessionStorage 中值的数量
  • ContainKeyAsync 判断 sessionStorage 中是否含有某个键名

WindowJsInterop

提供以下功能:

  • CreateBlobURLAsync: 使用 blob 创建 Blob Url
  • CreateBlobURLFromUint8ArrayAsync: 使用 byte[] 创建一个 Blob 对象URL
  • CreateBlobURLFromStringAsync: 使用 Base64 创建一个 Blob 对象的URL
  • RevokeUrlAsync: 释放 Blob 对象的 URL
  • RevokeUrlsAsync: 批量释放 Blob 对象的 URL
  • GetScrollPositionAsync: 获取滚动条位置
  • SetScrollPositionAsync: 修改滚动条位置
  • GetScrollHeightAsync: 获取滚动条高度
  • ScrollToBottomAsync 滚动到底部
  • ScrollToTopAsync 滚动到顶部
  • CopyToClipboardAsync 复制到剪贴板
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.5 180 12/20/2023
0.1.4 85 12/20/2023
0.1.3 107 12/17/2023
0.1.2 135 12/10/2023
0.1.1 115 12/10/2023
0.1.0 103 12/8/2023