devsheet logo Devsheet
My Feed Posts
Tools
JSON Viewer Javascript Runner Comma Converter HTML Editor SCSS to CSS SQL Formatter Online
Javascript Basics
  • For loop Javascript
  • Ternary Operator in Javascript
  • While loop in Javascript
Javascript Arrays
  • Sort array using Array.sort()
  • Minimum value from Array
  • Maximum value from Array
  • Sum of array values
  • Create array with blank values
  • Remove empty, false, undefined from array
  • Remove duplicate values from array
  • Combine multiple Arrays
  • Check if value is an array
  • Array Destructuring in Javascript(ES6)
  • Remove falsy value from array
  • Shuffle an array
  • Remove item from Array
  • Array.join() function
Javascript Objects
  • Merge multiple objects
  • Optional Chaining on Object
  • Loop through Object
  • Get all keys from Object
  • Get all values an Object
  • Remove a key or property from Object
Javascript Conversions
  • Convert Integer to String
  • Convert String to Integer
Javascript Date
  • Get current month name javascript
  • Get current year using Javascript
  • Get the day name from given date in Javascript
  • Get month name from a date using javascript
  • Get current timestamp in javascript
  • Add months to a date in Javascript
Javascript Cookies
  • Set a cookie for whole domain
  • Set a cookie that never expires
Javascript Examples
  • Add class to an element in javascript
  • Replace characters globally Javascript
  • Remove last character of a string in Javascript
  • Array.forEach() in javascript
  • Check if array contains duplicate values
  • Get first 10 words from string
javascript

Get Pseudo elements using Javascript

var elem = window.getComputedStyle(document.querySelector('.element'), ':before');
elem.getPropertyValue('color');
Was this helpful?
Similar Posts
  • Get all child elements of parent element in javascript
  • Join two arrays and remove duplicate elements using Javascript
  • Lodash - Get all elements of array except the last one
  • How to Remove duplicate elements from array in JavaScript ?
  • Remove first n elements from an array using Lodash
  • Remove last n elements from an array using Lodash
  • Order and find elements
Search all posts...
Programmer's Homepage
Your One-Stop Chrome Extension for Curated Developer Feeds, Where Learning and Growth Never Stop!
Connect using Github
  • Sign up
  • Login
Generating new answer. Please wait...