Certain API methods are not available
See original GitHub issueWhen I try to use the CSS.toggleProperty
method defined in the Chrome Debugger Protocol Viewer docs, I get an error:
>>> CSS.toggleProperty({ 'styleId': { 'styleSheetId': '56219.1', 'ordinal': 1 }, 'propertyIndex': 1, 'disable': true })
TypeError: CSS.toggleProperty is not a function
at repl:1:5
at REPLServer.defaultEval (repl.js:250:27)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.<anonymous> (repl.js:412:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:210:10)
at REPLServer.Interface._line (readline.js:549:8)
at REPLServer.Interface._ttyWrite (readline.js:826:14)
The same happens for DOM.setInspectModeEnabled
.
>>> DOM.setInspectModeEnabled({ 'enabled': true })
TypeError: DOM.setInspectModeEnabled is not a function
at repl:1:5
at REPLServer.defaultEval (repl.js:250:27)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.<anonymous> (repl.js:412:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:210:10)
at REPLServer.Interface._line (readline.js:549:8)
at REPLServer.Interface._ttyWrite (readline.js:826:14)
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Method not found in Web API 2 - Stack Overflow
I have gone through some tutorials and now Im trying to set up my web service. I have a really hard time trying...
Read more >Post Method is not called Web APi - MSDN - Microsoft
I am new in Web API. I had put some code in API controller for GET and POST. in case of GET, it...
Read more >ASP.NET Core Web API - How to Handle GET Request
Learn how to handle Get Request in .NET Core by using previously created repository pattern for business logic and how to write great ......
Read more >Building an ASP.NET Web API with ASP.NET Core - Toptal
In this article, I'll show you how to make an API for a small cost management system, including basic settings for authentication and...
Read more >Reference-Tableau Server REST API
This method is not available for Tableau Server. ... Download Data Source Revision, Downloads a specific version of a data source prior to...
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 FreeTop 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
Top GitHub Comments
@sarahlim which range are you sending? The style range should start right after the rule’s
{
and end before rule’s ending}
.here’s the inspector-protocol test which exercises this method: link
@sarahlim since I’m reading this anyway, here’s my two cents…
The fact is that figuring out the proper source range can be tricky and AFAIK there is no protocol method that aids you in figuring out the range given a CSS rule selector; you need to first walk the matched CSS rules for a given a
NodeId
withCSS.getMatchedStylesForNode
. Which seems to be what DevTools does when you toggle the checkbox of a CSS rule (if you inspect its WebSocket).I don’t know about your use case, but another approach would be: fetch the whole style sheet text with
CSS.getStyleSheetText
, perform the desired modifications and replace the original one withCSS.setStyleSheetText
.