web-pull-to-refresh icon indicating copy to clipboard operation
web-pull-to-refresh copied to clipboard

Get elements for IDs passed as contentEl and ptrEl options. Fixes #11.

Open raglan-road opened this issue 8 years ago • 3 comments

raglan-road avatar Sep 22 '15 15:09 raglan-road

Uh oh...I've botched this pull request and it's not attached to #11. Sorry!

raglan-road avatar Sep 22 '15 15:09 raglan-road

Looks like with this PR it will accept strings only? In that case it would break for people who use the work-around of supplying the element.

mk-pmb avatar Nov 09 '17 21:11 mk-pmb

So this is from a couple years ago, but I think I remember why I created this pull request.

The documentation in the code says these options are strings representing the IDs of the elements involved in the pull-to-refresh action. However, in the code they're not used as such: they're used as plain old elements (or whatever you pass in). This pull request was meant to close that loophole: if we're supposed to be passing in IDs as strings, we should use those strings to get the proper elements by ID. But, fixing the parameters to match the documentation would break what you're trying to do (pass in an element directly).

Since this pull request is two years old and the repo itself hasn't been updated in three, I'd say it's probably a dead issue, but it depends on whether or not you want the options to match what they're documented to be. They could just as easily be of any type with type checking to see if they're a string or a DOMElement and then react appropriately based on what was discovered. YMMV!

raglan-road avatar Nov 09 '17 21:11 raglan-road