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
module ExtJs = | |
open IntelliFactory.WebSharper | |
open IntelliFactory.WebSharper.ExtJs | |
open IntelliFactory.WebSharper.Html | |
[<JavaScript>] | |
let viewport() = | |
let panelConfig = Ext.panel.PanelConfiguration() | |
panelConfig.Title <- "Hello Ext" |
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
module CanvasPattern = | |
open IntelliFactory.WebSharper | |
open IntelliFactory.WebSharper.Html | |
open IntelliFactory.WebSharper.Html5 | |
[<JavaScript>] | |
let main() = | |
let elt = HTML5.Tags.Canvas [] | |
let canvas = As<CanvasElement> elt.Dom |
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
module SaveRestore = | |
open IntelliFactory.WebSharper | |
open IntelliFactory.WebSharper.Html | |
open IntelliFactory.WebSharper.Html5 | |
[<JavaScript>] | |
let main() = | |
let element = HTML5.Tags.Canvas [Text "Fallback content goes here."] | |
let canvas = As<CanvasElement> element.Dom |
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
module ExtJs = | |
open IntelliFactory.WebSharper | |
open IntelliFactory.WebSharper.ExtJs | |
open IntelliFactory.WebSharper.Html | |
[<JavaScript>] | |
let config() = | |
let config = Ext.panel.PanelConfiguration() | |
config.Title <- "Container Panel" |
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
module ExtJs = | |
open IntelliFactory.WebSharper | |
open IntelliFactory.WebSharper.ExtJs | |
open IntelliFactory.WebSharper.Html | |
[<JavaScript>] | |
let config() = | |
let config = Ext.panel.PanelConfiguration() | |
config.Title <- "Container Panel" |
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
module Console = | |
open IntelliFactory.WebSharper | |
open IntelliFactory.WebSharper.Html | |
/// Creates a div and logs its text content to the browser console. | |
[<JavaScript>] | |
let main() = | |
Div [Text "Hello"] | |
|>! OnAfterRender (fun elt -> JavaScript.Log elt.Text) |
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
module DragDrop = | |
open IntelliFactory.WebSharper | |
open IntelliFactory.WebSharper.Html | |
// the image to drag | |
[<JavaScript>] | |
let img = Img [Src "/image.png"; HTML5.Attr.Draggable "true"] | |
// source div |
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
module JQueryCssSelectors = | |
open IntelliFactory.WebSharper | |
open IntelliFactory.WebSharper.Html | |
open IntelliFactory.WebSharper.JQuery | |
[<JavaScript>] | |
let select _ = | |
JQuery.Of("p").Text() |> JavaScript.Log | |
JQuery.Of("#par").Text() |> JavaScript.Log |
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
module JQueryAdd = | |
open IntelliFactory.WebSharper | |
open IntelliFactory.WebSharper.Html | |
open IntelliFactory.WebSharper.JQuery | |
[<JavaScript>] | |
let main() = | |
Div [ | |
P [Text "Hello"] |
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
module JQueryAddClass = | |
open IntelliFactory.WebSharper | |
open IntelliFactory.WebSharper.Html | |
open IntelliFactory.WebSharper.JQuery | |
[<JavaScript>] | |
let main() = | |
Div [Text "Hello"; Id "main"] | |
|>! OnAfterRender (fun _ -> |