• Skip to main content
  • Skip to search
  • Skip to select language

Learn front-end development with high quality, interactive courses from Scrimba. Enroll now!

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

  1. 面向开发者的 Web 技术
  2. Web API
  3. Text
  4. Text:assignedSlot 属性
    • Is this useful?
    • English (US)
    • Deutsch
    • 日本語

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

在本文中

  • 值
  • 规范
  • 浏览器兼容性
  1. 文档对象模型(DOM)
  2. Text
  3. 构造函数
    1. Text()
  4. 实例属性
    1. assignedSlot
    2. wholeText
  5. 实例方法
    1. splitText()
  6. 继承
    1. CharacterData
    2. Node
    3. 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. TextDecoder
    34. TextEncoder
    35. TimeRanges
    36. TreeWalker
    37. XMLDocument
  8. 指南
    1. DOM 概述
    2. 使用文档对象模型
    3. Attribute reflection
    4. 使用 JavaScript 和 DOM 接口遍历 HTML 表格
    5. 使用选择器定位 DOM 元素
    6. Transforming with XSLT
    7. 使用 DOM 进行 web 和 XML 开发的示例

在本文中

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

Text:assignedSlot 属性

Baseline Widely available

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

  • Learn more
  • See full compatibility
  • Report feedback

Text 接口的 assignedSlot 只读属性返回与元素相关联的 HTMLSlotElement 对象。

值

HTMLSlotElement,如果文本节点没有关联 <slot> 元素,则为 null。

规范

Specification
DOM
# dom-slotable-assignedslot

浏览器兼容性

Help improve MDN

Learn how to contribute.

This page was last modified on 2024年5月20日 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.