Table of contents
TOC
Collapse the table of content
Expand the table of content

JavaScriptExtensions.AddJsLink Method

SharePoint Dev Documents|Last Updated: 6/19/2017
|
1 Contributor

Injects links to javascript files via a adding a custom action to the site

Namespace:Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll

Syntax

public static bool AddJsLink(this Web web, String key, IEnumerable<String> scriptLinks, Int32 sequence = 0)

Parameters

web

  Type: Microsoft.SharePoint.Client.Web
  Site to be processed - can be root web or sub site

key

  Type: System.String
  Identifier (key) for the custom action that will be created

  Type: System.Collections.Generic.IEnumerable<System.String>
  IEnumerable list of links to javascript files

(optional) sequence

  Type: System.Int32
  Specifies the ordering priority for actions. A value is 0 indicates that the button will appear at the first position on the ribbon.

Return Value

Type: bool
True if action was ok

See also

© 2018 Microsoft