• Skip to main content
  • Skip to search
  • Skip to select language
MDN Web Docs
  • References
    • Overview / Web Technology

      Web technology reference for developers

    • HTML

      Structure of content on the web

    • CSS

      Code used to describe document style

    • JavaScript

      General-purpose scripting language

    • HTTP

      Protocol for transmitting web resources

    • Web APIs

      Interfaces for building web applications

    • Web Extensions

      Developing extensions for web browsers

    • Accessibility

      Build web projects usable for all

    • Web Technology

      Web technology reference for developers

  • Learn
    • Overview / MDN Learning Area

      Learn web development

    • MDN Learning Area

      Learn web development

    • HTML

      Learn to structure web content with HTML

    • CSS

      Learn to style content using CSS

    • JavaScript

      Learn to run scripts in the browser

    • Accessibility

      Learn to make the web accessible to all

  • Plus
    • Overview

      A customized MDN experience

    • AI Help

      Get real-time assistance and support

    • Updates

      All browser compatibility updates at a glance

    • Documentation

      Learn how to use MDN Plus

    • FAQ

      Frequently asked questions about MDN Plus

  • Curriculum New
  • Blog
    • Playground

      Write, test and share your code

    • HTTP Observatory

      Scan a website for free

    • AI Help

      Get real-time assistance and support

  • Log in
  • Sign up for free
  1. 面向开发者的 Web 技术
  2. Web API
  3. Window
  4. Window:isSecureContext 属性
    • Is this useful?
    • English (US)
    • Deutsch
    • Español
    • Français
    • 日本語

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

在本文中

  • 值
  • 规范
  • 浏览器兼容性
  • 参见
  1. 文档对象模型(DOM)
  2. Window
  3. 实例属性
    1. caches
    2. closed
    3. cookieStore
    4. credentialless 实验性
    5. crossOriginIsolated
    6. crypto
    7. customElements
    8. devicePixelRatio
    9. document
    10. documentPictureInPicture 实验性
    11. event 已弃用
    12. external 已弃用
    13. fence 实验性
    14. frameElement
    15. frames
    16. fullScreen 非标准
    17. history
    18. indexedDB
    19. innerHeight
    20. innerWidth
    21. isSecureContext
    22. launchQueue 实验性
    23. length
    24. localStorage
    25. location
    26. locationbar
    27. menubar
    28. mozInnerScreenX 非标准
    29. mozInnerScreenY 非标准
    30. name
    31. navigation 实验性
    32. navigator
    33. opener
    34. orientation 已弃用
    35. origin
    36. originAgentCluster
    37. outerHeight
    38. outerWidth
    39. parent
    40. performance
    41. personalbar
    42. scheduler
    43. screen
    44. screenLeft
    45. screenTop
    46. screenX
    47. screenY
    48. scrollbars
    49. scrollMaxX 非标准
    50. scrollMaxY 非标准
    51. scrollX
    52. scrollY
    53. self
    54. sessionStorage
    55. sharedStorage 实验性
    56. speechSynthesis
    57. status 已弃用
    58. statusbar
    59. toolbar
    60. top
    61. trustedTypes
    62. visualViewport
    63. window
  4. 实例方法
    1. alert()
    2. atob()
    3. blur() 已弃用
    4. btoa()
    5. cancelAnimationFrame()
    6. cancelIdleCallback()
    7. captureEvents() 已弃用
    8. clearImmediate() 非标准 已弃用
    9. clearInterval()
    10. clearTimeout()
    11. close()
    12. confirm()
    13. createImageBitmap()
    14. dump() 非标准
    15. fetch()
    16. fetchLater() 实验性
    17. find() 非标准
    18. focus()
    19. getComputedStyle()
    20. getDefaultComputedStyle() 非标准
    21. getScreenDetails() 实验性
    22. getSelection()
    23. matchMedia()
    24. moveBy()
    25. moveTo()
    26. open()
    27. postMessage()
    28. print()
    29. prompt()
    30. queryLocalFonts() 实验性
    31. queueMicrotask()
    32. releaseEvents() 已弃用
    33. reportError()
    34. requestAnimationFrame()
    35. requestFileSystem() 非标准 已弃用
    36. requestIdleCallback()
    37. resizeBy()
    38. resizeTo()
    39. scroll()
    40. scrollBy()
    41. scrollByLines() 非标准
    42. scrollByPages() 非标准
    43. scrollTo()
    44. setImmediate() 非标准 已弃用
    45. setInterval()
    46. setResizable() 非标准 已弃用
    47. setTimeout()
    48. showDirectoryPicker() 实验性
    49. showOpenFilePicker() 实验性
    50. showSaveFilePicker() 实验性
    51. sizeToContent() 非标准
    52. stop()
    53. structuredClone()
    54. webkitConvertPointFromNodeToPage() 非标准 已弃用
    55. webkitConvertPointFromPageToNode() 非标准 已弃用
  5. 事件
    1. afterprint
    2. appinstalled
    3. beforeinstallprompt
    4. beforeprint
    5. beforeunload
    6. blur
    7. devicemotion
    8. deviceorientation
    9. deviceorientationabsolute
    10. error
    11. focus
    12. gamepadconnected
    13. gamepaddisconnected
    14. hashchange
    15. languagechange
    16. load
    17. message
    18. messageerror
    19. offline
    20. online
    21. orientationchange 已弃用
    22. pagehide
    23. pagereveal
    24. pageshow
    25. pageswap
    26. popstate
    27. rejectionhandled
    28. resize
    29. scrollsnapchange 实验性
    30. scrollsnapchanging 实验性
    31. storage
    32. unhandledrejection
    33. unload 已弃用
    34. vrdisplayactivate 非标准 已弃用
    35. vrdisplayconnect 非标准 已弃用
    36. vrdisplaydeactivate 非标准 已弃用
    37. vrdisplaydisconnect 非标准 已弃用
    38. vrdisplaypresentchange 非标准 已弃用
  6. 继承
    1. EventTarget
  7. DOM 的相关页面
    1. AbortController
    2. AbortSignal
    3. AbstractRange
    4. Attr
    5. CDATASection
    6. CharacterData
    7. Comment
    8. CustomEvent
    9. DOMError 已弃用
    10. DOMException
    11. DOMImplementation
    12. DOMParser
    13. DOMPoint
    14. DOMPointReadOnly
    15. DOMRect
    16. DOMTokenList
    17. Document
    18. DocumentFragment
    19. DocumentType
    20. Element
    21. Event
    22. EventTarget
    23. HTMLCollection
    24. MutationObserver
    25. MutationRecord
    26. NamedNodeMap
    27. Node
    28. NodeIterator
    29. NodeList
    30. ProcessingInstruction
    31. Range
    32. StaticRange
    33. Text
    34. TextDecoder
    35. TextEncoder
    36. TimeRanges
    37. TreeWalker
    38. XMLDocument

在本文中

  • 值
  • 规范
  • 浏览器兼容性
  • 参见

Window:isSecureContext 属性

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2018.

  • Learn more
  • See full compatibility
  • Report feedback

Window 接口的 isSecureContext 只读属性返回一个布尔值,指示当前上下文是安全的(true)还是不安全的(false)。

值

一个布尔值。

规范

Specification
HTML
# dom-issecurecontext-dev

浏览器兼容性

参见

  • 安全上下文

Help improve MDN

Learn how to contribute.

This page was last modified on 2024年4月26日 by MDN contributors.

View this page on GitHub • Report a problem with this content
MDN logo

Your blueprint for a better internet.

  • MDN on Bluesky
  • MDN on Mastodon
  • MDN on X (formerly Twitter)
  • MDN on GitHub
  • MDN Blog RSS Feed

MDN

  • About
  • Blog
  • Careers
  • Advertise with us

Support

  • Product help
  • Report an issue

Our communities

  • MDN Community
  • MDN Forum
  • MDN Chat

Developers

  • Web Technologies
  • Learn Web Development
  • MDN Plus
  • Hacks Blog
  • Website Privacy Notice
  • Cookies
  • Legal
  • Community Participation Guidelines

Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2025 by individual mozilla.org contributors. Content available under a Creative Commons license.