You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have any knowledge of a working example of how to use this, please let me know!
This project looks awesome and is exactly what I've been looking for, but I can't seem to figure out when I should be able to access the api.
Resources:
Before submitting an issue, please consult our docs.
Stencil version: (run npm list @stencil/core from a terminal/cmd prompt and paste output below):
NA
insert the output from npm list @stencil/core here
Unable to define api object in scripts. I can only use the api in the console after everything has run. window.onload doesn't work, nor does including scripts in order at the end of the body tag.
Additionally after loading a page in chrome, via the console the api object appears to be at window.WordPress.api, and can be used as:
var api = window.WordPress.api;
however the instructions:
var api = document.querySelector('wordpress-api').api(); //fail as api is not a function
var api = window.WordPress; //contains an api object (api.api.posts...).
Expected behavior:
<wordpress-api> <!-- with or without base url specified -->
</wordpress-api>
<script>
var api = window.WordPress.api;
console.log(JSON.stringify(api));
</script>
not to be undefined.
Steps to reproduce:
Related code:
insert any relevant code here
Other information:
If you have any knowledge of a working example of how to use this, please let me know!
The text was updated successfully, but these errors were encountered:
In my case I've worked around it by using settimeout delay before starting my logic.
As an aside I was easily able to extend this to work for custom post types, and it is fairly easy to embed media base64 encoded in the json, so this has been very useful for avoiding other cache limits.
If you have any knowledge of a working example of how to use this, please let me know!
This project looks awesome and is exactly what I've been looking for, but I can't seem to figure out when I should be able to access the api.
Resources:
Before submitting an issue, please consult our docs.
Stencil version: (run
npm list @stencil/core
from a terminal/cmd prompt and paste output below):NA
NA
I'm submitting a ... (check one with "x")
[ X] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://stencil-worldwide.slack.com
Current behavior:
Unable to define api object in scripts. I can only use the api in the console after everything has run. window.onload doesn't work, nor does including scripts in order at the end of the body tag.
Additionally after loading a page in chrome, via the console the api object appears to be at window.WordPress.api, and can be used as:
however the instructions:
Expected behavior:
Steps to reproduce:
Related code:
Other information:
If you have any knowledge of a working example of how to use this, please let me know!
The text was updated successfully, but these errors were encountered: