From 7ddf911f5d54ba4997b3d237ae7cd1effb74a120 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Fri, 4 Dec 2009 19:51:44 -0500 Subject: Add 2 new events: StartInlineScriptElement and EndInlineScriptElement --- lib/htmloutputter.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'lib/htmloutputter.php') diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php index 539e356e8..0c2d18da3 100644 --- a/lib/htmloutputter.php +++ b/lib/htmloutputter.php @@ -375,15 +375,18 @@ class HTMLOutputter extends XMLOutputter function inlineScript($code, $type='text/javascript') { - $this->elementStart('script', array('type' => $type)); - if($type == 'text/javascript') { - $this->raw('/*raw($code); - if($type == 'text/javascript') { - $this->raw(' /*]]>*/'); // XHTML compat + if(Event::handle('StartInlineScriptElement', array($this,&$code,&$type))) { + $this->elementStart('script', array('type' => $type)); + if($type == 'text/javascript') { + $this->raw('/*raw($code); + if($type == 'text/javascript') { + $this->raw(' /*]]>*/'); // XHTML compat + } + $this->elementEnd('script'); + Event::handle('EndInlineScriptElement', array($this,$code,$type)); } - $this->elementEnd('script'); } /** -- cgit v1.2.3-54-g00ecf