Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fix] app_sources.opa: remove an implicit protected value exposition,…

… and make it dynamically published to limit its exposition
  • Loading branch information...
commit 007c8b003698e5d236496cf6f5ffe94da545ebab 1 parent db992a7
@OpaOnWindowsNow OpaOnWindowsNow authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 stdlib/core/web/server/app_sources.opa
View
7 stdlib/core/web/server/app_sources.opa
@@ -1,5 +1,5 @@
/*
- Copyright © 2011 MLstate
+ Copyright © 2011, 2012 MLstate
This file is part of OPA.
@@ -49,7 +49,7 @@ AppSources =
| _ -> dom
- show_file(filename) =
+ show_file(filename)(_) =
content = %%BslAppSrcCode.get_file_content%%(filename)
Dom.transform([#content <- <>{content}</>])
@@ -62,7 +62,8 @@ AppSources =
)
files =
new_file(filename) =
- <a onclick={_ -> show_file(filename)}>{filename}</>
+ show = show_file(filename)
+ <a onclick={show}>{filename}</>
|> apply_style(css { display: block }, _)
<span id=#files onready={_ -> init()}>
{List.map(new_file, app_files)}
Please sign in to comment.
Something went wrong with that request. Please try again.