This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

queryCommandIndeterm

Summary

Returns a Boolean value that indicates whether the specified command is in the indeterminate state.

Method of dom/TextRangedom/TextRange

Syntax

var Result = document.queryCommandIndeterm(/* see parameter list */);

Parameters

cmdID

Data-type
BSTR


String that specifies a command identifier.

Return Value

Returns an object of type BooleanBoolean

Boolean

Boolean that returns one of the following possible values:

Return value Description
true The command is in the indeterminate state.
false The command is not in the indeterminate state.

Examples

function SetToBold () {
            if (document.queryCommandIndeterm ("bold")) {
                alert ("The 'bold' command is in an indeterminate state.");
            }
            else {
                if (document.queryCommandState ("bold")) {
                    alert ("The bold formatting will be removed from the selected text.");
                }
                else {
                    alert ("The selected text will be displayed in bold.");
                }
            }
            document.execCommand ('bold', false, null);
        }


Notes

Remarks

This method is a wrapper function for the command constants. You can obtain an IHTMLDocument2 interface using IID_IHTMLDocument2 for the IID. This method is a wrapper function for the command constants. You can obtain an IHTMLControlRange interface using IID_IHTMLControlRange for the IID. This method is a wrapper function for the command constants. You can obtain an IHTMLTxtRange interface using IID_IHTMLTxtRange for the IID.

Attributions