Skip to content

Commit

Permalink
Use S.appendGlobalJs for JavaScript in XmlOrJsCmd.outSpan
Browse files Browse the repository at this point in the history
  • Loading branch information
eltimn committed May 3, 2016
1 parent 147a801 commit 9dd6829
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion web/webkit/src/main/scala/net/liftweb/http/CometActor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1444,8 +1444,10 @@ private[http] class XmlOrJsCmd(val id: String,

def inSpan: NodeSeq = xml.openOr(Text("")) ++ javaScript.map(s => Script(s)).openOr(Text(""))

def outSpan: NodeSeq = Script(Run("var destroy_" + id + " = function() {" + (destroy.openOr(JsCmds.Noop).toJsCmd) + "}")) ++
def outSpan: NodeSeq = {
S.appendGlobalJs(Run("var destroy_" + id + " = function() {" + (destroy.openOr(JsCmds.Noop).toJsCmd) + "}"))
fixedXhtml.openOr(Text(""))
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion web/webkit/src/main/scala/net/liftweb/http/LiftRules.scala
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ class LiftRules() extends Factory with FormVendor with LazyLoggable {
*
* {{{
* <span id="lift-event-js-F827001738725NKMEQNF"
* data-lift=removed-attributes="onclick">Do something!</span>
* data-lift-removed-attributes="onclick">Do something!</span>
* }}}
*
* This makes it possible to replace the old CSS with with similar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ object ContentSourceRestriction {
}
/**
* Indicates content from the given host path is allowed. See the
* `Content-Security-Policy` spec's [[http://www.w3.org/TR/CSP/#matching
* `Content-Security-Policy` spec's [[https://www.w3.org/TR/CSP/#source-list-path-patching
* matching rules for `host-source`]] for more about what this can look
* like.
*
Expand Down

0 comments on commit 9dd6829

Please sign in to comment.