This allows ResourceLoaderClientHtml to output state=ready instead
of state=loading with a no-op mw.loader.implement() call being embedded.
Test Plan:
* View source on page view when logged-out.
* Before:
- loader.state({"user.options":"loading"})
- loader.implement("user.options@..",function(){ .. user.options.state([]) })
* After:
- loader.state({"user.options":"ready"})
Bug: T176159
Change-Id: I18f76eaa960da9b0ca77f28e10f768587447a838
return false;
}
+ /**
+ * @param ResourceLoaderContext $context
+ * @return bool
+ */
+ public function isKnownEmpty( ResourceLoaderContext $context ) {
+ return !$context->getUserObj()->getOptions( User::GETOPTIONS_EXCLUDE_DEFAULTS );
+ }
+
/**
* @return string
*/