Dustin Wilson
b99cb53c57
DOM still a mess, but committing what I have for the moment
3 years ago
J. King
62db85f571
Fix error in serializer
3 years ago
Dustin Wilson
9d2b4acdae
Created MagicProperties trait for managing getters and setters
3 years ago
Dustin Wilson
637474cfba
Make XPath object only created if asked for in Document
3 years ago
Dustin Wilson
1ca312d8c6
Added getElementsByClassName to DOM
3 years ago
Dustin Wilson
afafbe3c31
Fixed a couple of pretty printing bugs
3 years ago
Dustin Wilson
9899b2fb81
Finishing up pretty printing
3 years ago
Dustin Wilson
9177ed6074
Cleaning up
3 years ago
Dustin Wilson
a8d146fad4
Pretty printing works (mostly) but is a mess right now lol
3 years ago
Dustin Wilson
82eb4828ed
More pretty printing work, cleanup of DOM methods
3 years ago
Dustin Wilson
ebcf7d091e
Continuing work on pretty printing
• New abstract class AbstractElement. Exists so Element can extend new
getters inherited from ContainerNode.
• Folded all serialization functionality into Document, but each node
type's __toString method still works.
• Text now has a couple of nonstandard sibling methods, but those will
be put in their own trait in the future as it's duplicate code from
Element
• ContainerNode and Element both now contain some DOM4 properties
3 years ago
Dustin Wilson
70f8769c93
Starting to move all DOM actual serialization to Document::serialize
3 years ago
Dustin Wilson
8be1364737
Started work on pretty printing
3 years ago
Dustin Wilson
3a431fe134
Optimize nodes
3 years ago
J. King
f08f1a1a37
Fix up attribute testing
Coverage is not more specific, and handling of prefixes is improved
3 years ago
Dustin Wilson
0d7f7ef0bf
More documentation updates, started on Element documentation
3 years ago
Dustin Wilson
80d71e1fb9
Fix reference for Document::body
3 years ago
Dustin Wilson
5b21004221
Documentation additions, Document::body
3 years ago
Dustin Wilson
3a0ffafc7a
Changed ElementRegistry to ElementMap, destructors for ElementMap
3 years ago
Dustin Wilson
6522a5b9d3
Fixed template element referencing, appending attribute nodes removed
3 years ago
J. King
2bfb77c081
Test template and attribute creation
3 years ago
Dustin Wilson
f5cca19355
More documentation, disabled C14N
3 years ago
Dustin Wilson
43e312b2af
Added beginnings of documentation
3 years ago
J. King
f660ecaad4
Use createElementNS when creating bare elements
This forces coercion in more situations, but has the advantage of being
consistent with creating an element in the HTML namespace
3 years ago
J. King
16acfa8d66
Lowercase in createElementNS
3 years ago
Dustin Wilson
3389903957
Remove lowercasing of namespace URIs
3 years ago
Dustin Wilson
53199fd53a
Normalize when setting element names and attribute names
3 years ago
Dustin Wilson
b39ce364aa
Oops, removed mistakenly-commited Attributes trait
3 years ago
Dustin Wilson
4bbc615e57
Id fix when appending attribute nodes, attribute fixes on Document
3 years ago
J. King
9eacd21c9d
Test edges of element serialization
3 years ago
J. King
d53b9237c4
Fix xmlns attributes properly
3 years ago
J. King
4c7953ddc8
Fix xmlns attributes
This exposes the attributes in the DOM via a workaround, making it
possible to serialize them like any other attribute
3 years ago
Dustin Wilson
91b9615f8a
Started DOM documentation
3 years ago
Dustin Wilson
c023e35f9c
Added Element::classList
3 years ago
Dustin Wilson
4f2ded817c
Fixed ownerDocument issue with TemplateElement
3 years ago
Dustin Wilson
5ea14e81ca
Added TemplateElement
3 years ago
J. King
d33929f4a1
Change namespace; add copyright info
3 years ago
Dustin Wilson
fbefea3073
Add Walk and Moonwalk generators
3 years ago
J. King
3915b41e47
Set id attributes as IDs
xml:id attributes also work on foreign content
3 years ago
J. King
8131888634
Expose original document encoding
3 years ago
J. King
cd41770653
First pass at high-level API
3 years ago
J. King
f50c46952e
Implement XML infoset coercion
3 years ago
J. King
5d9b1a3a68
Start on infoset coercison
3 years ago
J. King
01361efdb8
Various fixes
3 years ago
J. King
179a21441c
Select and template insertion modes
3 years ago
J. King
065f9c97d6
Handle non-foreign fragment cases
3 years ago
J. King
ab972a838c
Fix DOCTYPE serialization
Also patch all top-level comments out
3 years ago
Dustin Wilson
63fe744864
Printing 👌🏻
Made each of the node types serialize themselves through __toString with serialize used in Document, DocumentFragment, and Element.
6 years ago
Dustin Wilson
ab1a78c192
Modifying printing
• Added exceptions for disabled inherited DOMDocument methods that don't make sense in an HTML5 library.
• Moved the inherited methods from the Printing trait to Document as DocumentFragment and Element don't inherit anything to print.
6 years ago
Dustin Wilson
dfda8d5f3a
Organization
• Moved the ancestor and descendant methods into their own traits along with the compare method which they share.
• Made DocumentFragment use only the descendant methods and not the ancestor ones.
• Fixed error in README.
6 years ago