forked from PowerShell/vscode-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow inclusion of JavaScript and CSS file paths in the HtmlContentView
This change adds the client-side behavior for new parameters to Set-VSCodeHtmlContentView which allow the user to specify JavaScriptPaths and StyleSheetPaths to include local JavaScript and CSS files into their HTML views. Resolves PowerShell#910.
- Loading branch information
Showing
4 changed files
with
65 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
var h1 = document.createElement('h1'); | ||
h1.appendChild(document.createTextNode('Hello from JavaScript!')); | ||
document.body.appendChild(h1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
body { | ||
color: white; | ||
background-color: cornflowerblue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
$params = @{ | ||
HtmlBodyContent = "Testing JavaScript and CSS paths..." | ||
JavaScriptPaths = ".\Assets\script.js" | ||
StyleSheetPaths = ".\Assets\style.css" | ||
} | ||
|
||
$view = New-VSCodeHtmlContentView -Title "Test View" -ShowInColumn Two | ||
Set-VSCodeHtmlContentView -View $view @params |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters