Commit c1bc910e authored by Fred Chasen's avatar Fred Chasen

Add css escape polyfill

parent 2cf94589
{
"name": "pagedjs",
"version": "0.1.13",
"version": "0.1.18",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -1758,6 +1758,11 @@
"source-map": "^0.5.3"
}
},
"css.escape": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz",
"integrity": "sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s="
},
"cssom": {
"version": "0.3.4",
"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz",
......
......@@ -10,6 +10,7 @@
"browser": "dist/paged.js",
"dependencies": {
"css-tree": "1.0.0-alpha.29",
"css.escape": "^1.5.1",
"event-emitter": "^0.3.5",
"lodash": "^4.17.10"
},
......
......@@ -71,7 +71,7 @@ class TargetCounters extends Handler {
return;
}
let val = attr(selected, target.args);
let element = chunker.pagesArea.querySelector(val);
let element = chunker.pagesArea.querySelector(CSS.escape(val));
if (element) {
let selector = UUID();
......
......@@ -65,7 +65,7 @@ class TargetText extends Handler {
let queried = fragment.querySelectorAll(query);
queried.forEach((selected, index) => {
let val = attr(selected, target.args);
let element = fragment.querySelector(val);
let element = fragment.querySelector(CSS.escape(val));
if (element) {
if (target.style === "content") {
let text = element.textContent;
......
......@@ -3,6 +3,8 @@ import baseStyles from './base';
import { UUID } from '../utils/utils';
import Hook from "../utils/hook";
import "css.escape"; // polyfill for CSS.escape
class Polisher {
constructor(setup) {
this.sheets = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment