Skip to content

Implement of Node's properties (#16) #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 47 commits into from
Jun 3, 2021
Merged

Implement of Node's properties (#16) #22

merged 47 commits into from
Jun 3, 2021

Conversation

hepheir
Copy link
Owner

@hepheir hepheir commented Jun 3, 2021

노드 구현 과정에서 다음의 인터페이스도 함께 구현되었습니다.

hepheir added 30 commits May 26, 2021 11:26
* Start Implementing `Node`

* Add definition group `NodeType`

* Create class constructor

* Add readonly attribute `node_type`

* Add readonly attribute `node_name` (abstract)

* Add protected boolean attribute `_read_only`

* Add attribute `node_value` (abstract)

* Add readonly attribute `parent_node`

also create a method
* `_set_parent_node()`

* Add readonly attribute `child_nodes`

* Add readonly attributes `first_child`, `last_child`

* Add readonly attributes `previous_sibling`, `next_sibling`

* Add readonly attribute `attributes` (abstract)

* Add readonly attribute `owner_document`
* Start implementing NodeList

* Make class `NodeList` more list-like by inheriting `list`

* Add readonly attribute `length`

* Add method `item`
To prevent pylint(import-error)
 `pylint --generate-rcfile > .pylintrc`
* Create fundamental_interface.py

* Create DOMException.py

* Create definition group `ExceptionCode`

* Create `DOMException` which inherits from `ExceptionCode` and `Exception`

* Bind `DOMException` to `w3.python.core.fundamental_interfaces`

* Fix TypeError: "cannot extend enumerations"

* Bind `DOMException` to `w3.python.dom` and `w3.python.core`

* Create unittest for `DOMException`

* Rename dir "fundamental_interfaces" -> "fundamental_interface' of "w3/python/core/"
* Create DOMImplementation.py

* Create interface `DOMImplementation`

* Create `has_feature` method but not fully implemented

* Bind `DOMImplementation` to `w3.python.dom`
with its accessor method `_set_node_value()`
with its accessor method `_set_node_type()`
when `node` is an instance of `Node()`
Yes: `node.node_value`
No: `node._node_value`
`NO_MODIFICATION_ALLOWED_ERR`
...to make Python extension of VSCode to discover unittests.

(cherry picked from commit c147e3f)
hepheir added 16 commits June 2, 2021 14:09
* Create NodeList.py

* Implement `NodeList` based on `list` type

* Create unittest for `NodeList`
* Create NodeList.py

* Implement `NodeList` based on `list` type

* Create unittest for `NodeList`

* Unimport unused interface `DOMException`

* Fix circular import issue

by unimporting `Node` and
replacing `_AnyNode = Node` with `_AnyNode = Any`
and its accessor method `_init_child_nodes()`
Related issue:
Implement of interface NodeList #17
commit 7307b2d
Author: Hepheir <[email protected]>
Date:   Wed Jun 2 01:19:42 2021 +0900

    Remove all except `DOMString`

commit e9134ff
Author: Hepheir <[email protected]>
Date:   Mon May 31 20:48:17 2021 +0900

    Change the type of `DOMString` from `TypeVar` into `str`

Related issues:
- Implement of `DOMString` type #18
also create accessor method `_nth_child_of_parent()`

#16
TODO: Implement interface `NamedNodeMap` #19
with its accessor `_set_owner_document()`
and declared `_Document` for typing temporarily (TODO, #20)
@hepheir hepheir added the enhancement New feature or request label Jun 3, 2021
@hepheir hepheir self-assigned this Jun 3, 2021
@hepheir hepheir linked an issue Jun 3, 2021 that may be closed by this pull request
17 tasks
@hepheir hepheir merged commit 9e233fd into master Jun 3, 2021
@hepheir hepheir added type:others issues not falling in bug, perfromance, support, build and install or feature type:feature Feature requests and removed enhancement New feature or request type:others issues not falling in bug, perfromance, support, build and install or feature labels Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement interface Node
1 participant