Comments (5)
Hi @ahauser16!
This is because the documentation website was recently migrated to a new backend system, so the specific selector being used is no longer valid.
As a temporary workaround, you can change the selector on line 4 from .navigation-rail__links
to .devsite-tabs-wrapper
to see something similar.
from chrome-extensions-samples.
Is this issue stil open ???
from chrome-extensions-samples.
quering the dom for the nav as below solved the issue for me. I can see the Tip text on the navbar that opens the popup.
const nav = document.querySelector('.lower-tabs .devsite-tabs-wrapper');
OR
const nav = document.querySelector('.upper-tabs .devsite-tabs-wrapper');
However, I still see the error Uncaught (in promise) TypeError: Cannot read properties of null (reading 'append')
that points to the line nav.append(tipWidget);
from chrome-extensions-samples.
Style issue :
Add double quote in style attribute of button.
before
const tipWidget = createDomElement(`
<button class="navigation-rail__link" popovertarget="tip-popover" popovertargetaction="show" style="padding: 0; border: none; background: none;>
<div class="navigation-rail__icon">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d='M15 16H9M14.5 9C14.5 7.61929 13.3807 6.5 12 6.5M6 9C6 11.2208 7.2066 13.1599 9 14.1973V18.5C9 19.8807 10.1193 21 11.5 21H12.5C13.8807 21 15 19.8807 15 18.5V14.1973C16.7934 13.1599 18 11.2208 18 9C18 5.68629 15.3137 3 12 3C8.68629 3 6 5.68629 6 9Z'"></path>
</svg>
</div>
<span>Tip</span>
</button>
`);
after
const tipWidget = createDomElement(`
<button class="navigation-rail__link" popovertarget="tip-popover" popovertargetaction="show" style="padding: 0; border: none; background: none;">
<div class="navigation-rail__icon">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d='M15 16H9M14.5 9C14.5 7.61929 13.3807 6.5 12 6.5M6 9C6 11.2208 7.2066 13.1599 9 14.1973V18.5C9 19.8807 10.1193 21 11.5 21H12.5C13.8807 21 15 19.8807 15 18.5V14.1973C16.7934 13.1599 18 11.2208 18 9C18 5.68629 15.3137 3 12 3C8.68629 3 6 5.68629 6 9Z'"></path>
</svg>
</div>
<span>Tip</span>
</button>
`);
from chrome-extensions-samples.
Closing this as a duplicate of #1084 since I just left a more detailed reply there, but thanks all for the feedback.
from chrome-extensions-samples.
Related Issues (20)
- how to specify the content security policy for content script HOT 1
- <!-- Thank you for submitting a Pull Request. Please:
- Kit-khat
- Can't call chrome.desktopCapture.chooseDesktopMedia from serviceWorker without target tab. HOT 1
- .github/CODE_OF_CONDUCT.md
- Chrome 121.0.6167.86 version have a bug some website line Some table lines are not aligned, chrome 120.x not have this BUG same code HOT 4
- How to open devTools after open a new tab? HOT 1
- continuous recording sample - allow user to select media stream tab or window ? HOT 1
- Manifest V3 declarativeNetRequest redirect sample is completely broken on latest chrome 121 HOT 11
- The Quick Start tutorial "quick-api-reference" sample doesn't work HOT 15
- Samples for chrome.management HOT 2
- Network preview tab override HOT 2
- How i can use extensions to hide maximize、minimize HOT 1
- Sample for chrome.types HOT 1
- Sample for chrome.desktopCapture
- Sample for chrome.offscreen HOT 1
- A CI to check for grammer mistake in the `.md` files HOT 8
- Adding a pull request template to the repository as like issue template HOT 2
- CEO
- Sample for chrome.commands API HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chrome-extensions-samples.