Method: Taka::DOM::Document#createAttribute
- Defined in:
- lib/taka/dom/document.rb
#createAttribute(name) ⇒ Object
59 60 61 62 63 64 |
# File 'lib/taka/dom/document.rb', line 59 def createAttribute name unless name =~ /^\w+$/ raise DOMException.new(DOMException::INVALID_CHARACTER_ERR) end Nokogiri::XML::Attr.new(self, name) end |