function javaScriptFunctionProvider(hostEditor, pos) {
        // Only provide a JavaScript editor when cursor is in JavaScript content
        if (hostEditor.getModeForSelection() !== "javascript") {
            return null;
        }

        //Send analytics data for Quick Edit open
        HealthLogger.sendAnalyticsData(
            "QuickEditOpen",
            "usage",
            "quickEdit",
            "open"
        );
        // Only provide JavaScript editor if the selection is within a single line
        var sel = hostEditor.getSelection();
        if (sel.start.line !== sel.end.line) {
            return null;
        }

        // Always use the selection start for determining the function name. The pos
        // parameter is usually the selection end.
        var functionResult = _getFunctionName(hostEditor, sel.start);
        if (!functionResult.functionName) {
            return functionResult.reason || null;
        }

        return _createInlineEditor(hostEditor, functionResult.functionName);
    }
This function is registered with EditorManager as an inline editor provider. It creates an inline editor
when the cursor is on a JavaScript function name, finds all functions that match the name
and shows (one/all of them) in an inline editor.

@param {!Editor} editor
@param {!{line:number, ch:number}} pos
@return {$.Promise} a promise that will be resolved with an InlineWidget
     or null if we're not ready to provide anything.