-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing interface definition for Highlight API #53003
Comments
Experimental features are not included in the built-in DOM |
Thanks for the fast reply! |
This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
My understanding is the Custom Highlights API has left the experimental stage, with only Firefox for desktop and Android lacking support for it in their respective official versions. Are there any plans to add it to the DOM definitions? |
Looking for it as well. Is there anyway to get it working until it is officially supported? |
You can create a d.ts file for you project declare class Highlight {
constructor(...range: Range[]);
}
declare namespace CSS {
var highlights: Map<string, Highlight>;
} |
@RyanCavanaugh I guess this issue should be reopened, as this API has really good support in browsers now. https://developer.mozilla.org/en-US/docs/Web/CSS/::highlight |
|
@Momomash Спасибо) Thanks! |
Bug Report
🔎 Search Terms
🕗 Version & Regression Information
Version 4.9.5
This happen in the 'Nightly' version as well.
Please keep and fill in the line that best applies:
X This is the behavior in every version I tried, and I reviewed the FAQ for entries about: Could not find anything relevant.
⏯ Playground Link
A link to a TypeScript Playground "Share" link which shows this behavior: http://www.typescriptlang.org/play/?ts=Nightly
💻 Code
🙁 Actual behavior
Cannot find name 'Highlight'.(2304)
🙂 Expected behavior
Should return a newly created
Highlight
object.Constructor
Highlight()
The text was updated successfully, but these errors were encountered: