Giter Club home page Giter Club logo

jsinterop's Introduction

jsinterop [ARCHIVED]

Please go to https://github.com/aspnet/Extensions/tree/master/src/JSInterop to see the latest JSInterop code base and to file issues

This repo is for Microsoft.JSInterop, a package that provides abstractions and features for interop between .NET and JavaScript code.

Usage

The primary use case is for applications built with Mono WebAssembly or Blazor. It's not expected that developers will typically use these libraries separately from Mono WebAssembly, Blazor, or a similar technology.

How to build and test

To build:

  1. Ensure you have installed an up-to-date version of the .NET Core SDK. To verify, run dotnet --version and be sure that it returns 2.1.300 (i.e., .NET Core 2.1) or later.
  2. Run dotnet build

To run tests:

  1. Run dotnet test test/Microsoft.JSInterop.Test

jsinterop's People

Contributors

adrianwright109 avatar deril avatar eilon avatar jongalloway avatar mrpmorris avatar stevesandersonms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsinterop's Issues

Enable XML API doc generation

The latest Microsoft.JSInterop and Mono.WebAssembly.Interop packages are missing the XML API doc files. These are needed to generate API docs for these libraries.

Question: how secure is JSInvokable?

Hi guys,
I was thinking about how safe it would be to allow any call from javascript to .net functions via the JSInvokable attribute.
In a fully client environment (ie Blazor) it might not be a problem (client on client, you know it's insecure), but in Razor Components we're practically expanding the attack surface on the server (among other things without even saying it clearly).
Could it be useful to add a sort of filters to the call so that you can intercept and make it possible for the developer to block any illegitimate call?
Another alternative is to evaluate whether to use System.Security.Policy Evidence, so that calls from js run in a less secure context, but I think that it is also necessary to modify the hosting model of .net core to allow it.
I do not know, I await your considerations, maybe it's not a problem ...

Allow JsInvokable method to have access modifier - internal

I do some blazor component and want to host it as nuget package.

Mostly have methods marked as internal because they don't should be visible outside assembly.

Can't set internal to [JSInvokable] method because it requires only public.

I don't want this methods to be public accessible.

untitled

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.