Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-02-06 19:24:16
- anoke
- Archived Plugin Author
- Registered: 2006-04-15
- Posts: 152
missing semicolons in dom_attach (txplib_html.php)?
Line 569, 570, 572 in txplib_html.php – some semicolons missing? SVN says ‘at 2240’.
$js = <<<EOF
var e = document.getElementById('{$id}');
var n = document.createElement('{$wraptag}')
n.innerHTML = '{$c}'
n.setAttribute('id','{$wraptagid}');
e.appendChild(n)
EOF;
Zap the thread if all’s ok..
umm.. this is / should be corrected/resolved .
Last edited by anoke (2007-02-07 20:31:11)
- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -
Offline
#2 2007-02-08 02:18:41
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: missing semicolons in dom_attach (txplib_html.php)?
In JavaScript semi-colons are optional, you only need them if you want to put more than one statement on a line. Nevertheless, I added them anyway. :)
Offline
Re: missing semicolons in dom_attach (txplib_html.php)?
It is kind of considered bad practice to mix styles on a line by line basis like that though and will prevent you from running your javascript through compression schemes like JSmin (which probably wouldn’t be needed for dom_attach).
Non issue since it’s fixed anyway :)
Shoving is the answer – pusher robot
Offline