Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Meta Attributes

K. Gadd edited this page Apr 25, 2014 · 13 revisions

The assembly JSIL.Meta contains various attributes you can use to control the behavior of JSILc when it translates your managed code to JavaScript. These attributes can either be applied directly, or applied indirectly using Proxies.

Universal Attributes

JSIgnore

Ignore any references to the attributed type or member. Attempts to use it will produce errors at runtime. Anything defined by the ignored type or member will be ignored automatically (i.e. ignoring a class ignores its methods).

JSChangeName

Renames the type or member at runtime. This allows you to work around members having a reserved name in JavaScript, and similar problems (for example, we use this to rename .NET's ToString to match JS's toString.)

JSReplacement

Replaces references to the attributed type or member with a JavaScript Expression. Replacement expressions support special variable tokens:

lorem ipsum dolor amet

Type Attributes

JSStubOnly

Only generate a stub for this type instead of a full definition. The stub will provide the shape of the type (as if the whole containing assembly were stubbed) so that you can provide implementations with externals.