+ "\" type=\"text/css\" />", $page, $destpage);
+ }
+ elsif ($key eq 'script') {
+ my $defer=exists $params{defer} ? ' defer="defer"' : '';
+ my $async=exists $params{async} ? ' async="async"' : '';
+ my $js=bestlink($page, $value.".js");
+ if (! length $js) {
+ error gettext("script not found");
+ }
+ push @{$metaheaders{$page}}, scrub('<script src="'.urlto($js, $page).
+ '"' . $defer . $async . ' type="text/javascript"></script>',
+ $page, $destpage);