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 发布文章使用:只允许注册用户才可以访问!


  • 相关阅读:
    java web(七)Cookie的简单使用
    java web(六)多个请求对应一个Servlet
    <十六>JDBC_使用 DBUtils 编写通用的DAO
    <十五>JDBC_使用 DBUtils 进行更新、查询操作
    附加作业
    第五周作业
    第八周作业
    第七周作业
    第一周作业
    第六周作业
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/13931327.html
Copyright © 2011-2022 走看看