Clear Up
SharpKit Reference

JsExportAttribute Class

Provides information regarding how SharpKit will export JavaScript code

Namespace: SharpKit.JavaScript

Base Types


Base Interfaces



Name Description


Name Description
CodeInjectionFilename Specifies to inject all available helper methods generated by SharpKit into a single separate file, this feature is supported by SharpKit 5 only.
DefaultFilename Specifies default js filename for all types that didn't specify a specific js file for export If not specified, default file will be res/[AssemblyName].js
DefaultFilenameAsCsFilename Specifies to use the .cs filename for all types that didn't specify a specific js file for export, MyTextBox.cs -> MyTextBox.js
EnableProfiler Injects profiling code into JavaScript functions to enable performance profiling.
ExportComments Specifies whether to include C# comments in the JavaScript code
FilenameFormat Specifies prefix / suffix to any filename exported by SharpKit, e.g.: FilenameFormat="js/{0}"
GenerateSourceMaps Specifies to generate chrome source maps, which enables debugging of JavaScript in C#. To enable this feature you must add a handler in your web.config file:
<add name="SourceMapsHandler" type="SharpKit.Web.Server.Handlers.SourceMapsHandler, SharpKit.Web" verb="*" path="SourceMaps.ashx" />
And enable source maps in chrome: show development bar, click options wheel, check enable source maps.
LongFunctionNames Instructs SharpKit to provide any exported function with a global unique name, to help debugging of client side code.
Minify Specifies whether SharpKit should minify the exported files
UseExactEquals Instructs SharpKit to use '===' and '!==' (exact equals/not equals) instead of '==' / '!=' when checking equality between objects. Custom exact equality can be achieved by using the extension method JsContext.ExactEquals
var x = "true";
var y = true;
var b = x.ExactEquals(y);
UseStrict Uses the ECMAScript5 strict mode.
© Copyright 2005-2011 SharpKit. All rights reserved.