Problem/Motivation

JS files with async/defer prop are conflicting with admin js assets .

Steps to reproduce

  • Enable async or defer assets
  • Login as admin

Proposed resolution

Add hook alter to add certain condition to disable async/defer prop.

CommentFileSizeAuthor
#2 3481586-agg_jscss_asyncdefer-01.patch624 bytes_renify_

Comments

_renify_ created an issue. See original summary.

_renify_’s picture

StatusFileSize
new624 bytes
aaronsansal’s picture

Status: Active » Fixed

Thanks for the patch! This is fixed in 1.1.0 (commit 964cbc4).

Instead of an alter of the whole asset options, there is a new hook_agg_jscss_asyncdefer_strategy_alter(string &$strategy, array $context) that lets you change the strategy (none/async/defer for JS, none/preload for CSS) per library or file. See agg_jscss_asyncdefer.api.php.

For the admin conflict in particular, 1.1.0 also disables async/defer on the administration theme by default.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

aaronsansal’s picture

Version: 1.0.1 » 1.1.0

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.