zoukankan      html  css  js  c++  java
  • xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

    Chrome console & Command Line API

    $ && $$

    querySelector

    querySelectorAll

    Command Line API

    
    "use strict";
    
    /**
     *
     * @author xgqfrms
     * @license MIT
     * @copyright xgqfrms
     * @created 2020-10-01
     * @modified
     *
     * @description Chrome & Command Line API
     * @difficulty Easy Medium Hard
     * @complexity O(n)
     * @augments
     * @example
     * @link
     * @solutions
     *
     * @best_solutions
     *
     */
    
    const log = console.log;
    
    /*
    
    typeof $$(`*`);
    // "object"
    
    Array.isArray($$(`*`));
    // true
    
    */
    
    const items = [...$$(`*`)];
    
    for(const item of items) {
      log(`item =`, item);
      // append styles ✅
      const styles = item.getAttribute(`style`)
      item.setAttribute(`style`, `color: green !important;` + styles);
      item.setAttribute(`style`, `color: green !important; ${styles}`);
    }
    
    for(const item of items) {
      log(`item =`, item);
      item.setAttribute(`style`, `border: green px solid red !important;`);
      // writeable & css overwrite bug ❌
      item.setAttribute(`style`, `color: green !important;`);
    }
    
    for(const item of items) {
      log(`item =`, item);
      // writeable & css overwrite bug ❌
      item.style = "border: 1px solid red !important";
    }
    
    for(const item of items) {
      log(`item =`, item);
      // read only bug ❌ ????
      item.style.border = "1px solid red !important";
    }
    
    
    
    
    
    

    refs

    使用 Canvas 实现一个类似 Google 的可视化的页面错误反馈库

    https://www.cnblogs.com/xgqfrms/p/13930603.html



    ©xgqfrms 2012-2020

    www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


  • 相关阅读:
    线性时间选择
    ios理解 Pro Mutlithreading and Memory Management for iOS and OS X with ARC, Grand Central Dispatch, and Blocks
    ef
    c# 采集 获取网页数据内容 一会超时的问题
    entity4.1
    逐渐约束
    entity4.1
    ObjectContext.Refresh
    使用内存表
    MVCdropdownlist
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/13931327.html
Copyright © 2011-2022 走看看