Class: Browser::DOM::DocumentFragment

Inherits:
Element show all
Defined in:
opal/browser/dom/document_fragment.rb

Overview

TODO: DocumentFragment is not a subclass of Element, but a subclass of Node. It implements a ParentNode.

Direct Known Subclasses

ShadowRoot

Constant Summary

Constants inherited from Element

Element::Img

Constants inherited from Node

Node::ATTRIBUTE_NODE, Node::CDATA_SECTION_NODE, Node::COMMENT_NODE, Node::DOCUMENT_FRAGMENT_NODE, Node::DOCUMENT_NODE, Node::DOCUMENT_TYPE_NODE, Node::ELEMENT_NODE, Node::ENTITY_NODE, Node::ENTITY_REFERENCE_NOCE, Node::NOTATION_NODE, Node::PROCESSING_INSTRUCTION_NODE, Node::TEXT_NODE

Instance Attribute Summary

Attributes inherited from Element

#attribute_nodes, #attributes, #class_name, #class_names, #editable, #height, #id, #offset, #position, #scroll, #size, #style!, #width, #window

Attributes inherited from Node

#child, #children, #document, #element_children, #first_element_child, #inner_html, #last_element_child, #name, #namespace, #next, #next_element, #node_type, #parent, #previous, #previous_element, #value

Class Method Summary collapse

Methods inherited from Element

#/, #=~, #[], #[]=, #add_class, #animate, #animation_queue, #at, #at_css, #at_xpath, #blur, #click, #css, #data, def_selector, #edit, #editable?, #fade_in, #fade_out, #fade_toggle, #focus, #focused?, #hide, #inner_dom, #inner_dom=, #inspect, native_matches?, #remove_attribute, #remove_class, #search, selector, #shadow, #shadow?, #show, #slide_down, #slide_toggle, #slide_up, #style, subclasses, tag_name, #toggle, #toggle_class, #visible?, #xpath

Methods included from Event::Target

#off, #on, #on!, #one, #trigger, #trigger!

Methods inherited from Node

#<<, #==, #>>, #add_child, #add_next_sibling, #add_previous_sibling, #ancestors, #append_to, #blank?, #cdata?, #clear, #comment?, #content, #content=, #document?, #elem?, #fragment?, #initialize_copy, #parse, #path, #prepend_to, #remove, #remove_child, #replace, #text?, #traverse

Methods included from NativeCachedWrapper

#restricted?, #set_native_reference

Class Method Details

.createObject


20
21
22
# File 'opal/browser/dom/document_fragment.rb', line 20

def self.create
  $document.create_document_fragment
end

.new(node) ⇒ Object


8
9
10
11
12
13
14
15
16
17
18
# File 'opal/browser/dom/document_fragment.rb', line 8

def self.new(node)
  if self == DocumentFragment
    if defined? `#{node}.mode`
      ShadowRoot.new(node)
    else
      super
    end
  else
    super
  end
end