ElementAPI compatible with item getters
See original GitHub issueIssue Description
Please, provide access to HTML attributes through item getters.
The following code makes three assertions of which only one works.
import operator
import splinter
b = splinter.Browser()
b.visit('https://www.google.com/')
q = b.find_by_name('q').first
assert 'q' == q.get('name')
assert 'q' == operator.itemgetter('name')(q)
assert 'q' == q['name']
I would write the change myself but I have been unable to properly run the test-suite.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
Creating a Simple Component Using the Element API | Flow
In this section, we demonstrate how to create a simple component using the Element API and a single DOM element.
Read more >Create a JSON API/Feed for your elements in Craft. - GitHub
Element API for Craft CMS. This plugin makes it easy to create a JSON API for your entries (and other element types) in...
Read more >Using custom elements - Web Components | MDN
The controller of custom elements on a web document is the CustomElementRegistry object — this object allows you to register a custom ...
Read more >Lifecycle - Lit.dev
LitElement uses Promise objects to schedule and respond to element updates. ... method instead of the updateComplete getter to ensure compatibility with ...
Read more >With Element API, can I combine two entry types into a JSON ...
I'm using Craft as a headless CMS, so I wanted full control over the JSON it was returning. I didn't figure out how...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rg666 Go for it.
@rg666 I don’t see any bugs involving item getters or missing functionality. I encourage you to write unit tests for the behaviour so we can verify they work. If the unit tests pass, I’ll close this issue.