registration: Support skipFunction module definitions
authorJames D. Forrester <jforrester@wikimedia.org>
Tue, 19 Apr 2016 01:13:18 +0000 (18:13 -0700)
committerJforrester <jforrester@wikimedia.org>
Tue, 19 Apr 2016 01:24:06 +0000 (01:24 +0000)
Change-Id: I9c5cea3e8df1fae001d4d98c0782a04dec803776

docs/extension.schema.json

index a743afa..370e18e 100644 (file)
                                                                        "type": "string",
                                                                        "description": "Equivalent of remoteBasePath, but relative to $wgExtensionAssetsPath"
                                                                },
+                                                               "skipFunction": {
+                                                                       "type": "string",
+                                                                       "description": "Modules that provide fallback functionality can provide a \"skip function\". This function, if provided, will be passed along to the module registry on the client. When this module is loaded (either directly or as a dependency of another module), then this function is executed first. If the function returns true, the module will instantly be considered \"ready\" without requesting the associated module resources. The value returned here must be valid javascript for execution in a private function. It must not contain the \"function () {\" and \"}\" wrapper though."
+                                                               },
                                                                "scripts": {
                                                                        "type": ["string", "array"],
                                                                        "description": "Scripts to always include (array of file paths)",