★ wanayoo — archive 1999 https://developer.mozilla.org/ko/docs/Web/API/Document/queryCommandSupportedNouvelle recherche | Portail wanayoo
mozilla
검색 결과

    Document.queryCommandSupported()

    아직 자원 봉사자들이 한국어로 현재 문서를 번역하지 않았습니다. 가입해서 이 문서가 번역되는 일에 함께 해 주세요!
     

    Reports whether or not the specified editor query command is supported by the browser.

    Syntax

    isSupported = document.queryCommandSupported(command);
    
    command
    The command for which to determine support.

    If the command is not supported, a NotSupportedError exception is thrown.

    Otherwise:

    • If the command has no value or is disabled, an empty string is returned.
    • The "fontSize" command is handled specially; if its value override is set, that gets converted to an integer number of pixels and returned as a legacy font size.
    • If the command's value override is set, that gets returned.
    • Otherwise, the command's value is returned, as would be returned by document.queryCommandValue().

    Example

    var flg = document.queryCommandSupported("SelectAll");
    
    if(flg) {
      // ...Do something
    }
    

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support ? 9.0 (9.0) 4.0 ? ?
    Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support ? 9.0 (9.0) ? ? ?

    Specifications

    Specification Status Comment
    HTML Editing APIs
    The definition of 'querycommandsupported' in that specification.
    Editor's Draft  

    See also

    문서 태그 및 공헌자

    Contributors to this page: Sheppy, MHasan, gurdev_singh, ethertank, kscarfone, mnoorenberghe, teoli
    최종 변경: teoli,
    사이드바 숨기기