This repository was archived by the owner on Oct 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Add classList
+ functions of DOMTokenList
#106
Merged
garyb
merged 7 commits into
purescript-deprecated:master
from
sectore:feature/classlist-domtokenlist
Jun 11, 2017
Merged
Add classList
+ functions of DOMTokenList
#106
garyb
merged 7 commits into
purescript-deprecated:master
from
sectore:feature/classlist-domtokenlist
Jun 11, 2017
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Following functions of `DOMTokenList` are supported by modern browsers: * `add` * `remove` * `toggle` * `contains` * `item` - incl. tests
garyb
suggested changes
Jun 10, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! Just a few minor things, and this PR needs a rebase since the test PR was merged.
test/Main.purs
Outdated
|
||
-- liftEff :: forall eff a. Eff (phantomjs :: PHANTOMJS | eff) a -> Aff (phantomjs :: PHANTOMJS | eff) a | ||
-- liftEff = EffClass.liftEff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dead code
src/DOM/Node/DOMTokenList.purs
Outdated
foreign import _item :: forall eff. Int -> DOMTokenList -> Eff (dom :: DOM | eff) (Nullable String) | ||
|
||
item :: forall eff. Int -> DOMTokenList -> Eff (dom :: DOM | eff) (Maybe String) | ||
item index = map toMaybe <<< _item index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rearrange the arguments in here (and accordingly in the FFI) so the DOMTokenList
comes first in each case please?
which was removed by `522e1d6` before. Also add test script to `package.json` to run tests.
@garyb No problem, latest commits ⬆️ come with these fixes (rebase + remove dead code + rearrange arguments). |
into feature/classlist-domtokenlist
Thank you! |
garyb
approved these changes
Jun 11, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All the following functions of
DOMTokenList
are added and supported by all modernbrowsers (see https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList):
add
remove
toggle
contains
item
incl. tests (depends on PR Add test dependencies #105 )