question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

the plugin does not ignore the svg elements

See original GitHub issue

#I’m submitting a … (check one with “x”)

  • question
  • any problem or bug report
  • feature request

If you choose ‘problem or bug report’, please select OS: (check one with “x”)

  • Android
  • iOS

cordova information: (run $> cordova plugin list)

com.googlemaps.ios 2.6.0 "Google Maps SDK for iOS"
cordova-custom-config 5.0.1 "cordova-custom-config"
cordova-plugin-add-swift-support 1.7.0 "AddSwiftSupport"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-dialogs 1.3.4 "Notification"
cordova-plugin-fingerprint-aio 1.3.3 "FingerprintAllInOne"
cordova-plugin-globalization 1.0.8 "Globalization"
cordova-plugin-google-analytics 1.8.3 "Google Universal Analytics Plugin"
cordova-plugin-googlemaps 2.2.5 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 1.7.2 "InAppBrowser"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-mauron85-background-geolocation 3.0.0-alpha.14 "CDVBackgroundGeolocation"
cordova-plugin-mfp 8.0.2017102403 "IBM MobileFirst Platform Foundation"
cordova-plugin-mfp-jsonstore 8.0.2017090705 "IBM MobileFirst Platform Foundation JSONStore"
cordova-plugin-mfp-push 8.0.2017112208 "IBM MobileFirst Platform Foundation - Push Notifications"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-okhttp 2.0.0 "OkHttp"
cordova-plugin-secure-storage 2.6.8 "SecureStorage"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.3.0 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-toast 2.6.0 "Toast"
cordova.plugins.diagnostic 3.9.2 "Diagnostic"
ionic-plugin-keyboard 2.2.1 "Keyboard"
mx.ferreyra.callnumber 0.0.2 "Cordova Call Number Plugin"

If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly)

"@ionic-native/core": "4.4.0" "@ionic-native/google-maps": "^4.5.3"

Current behavior:

Expected behavior: No errors while tracing DOM tree.

Related code, data or error log (please format your code or data):

TypeError: (node.className || "").split is not a function. (In '(node.className || "").split(" ")', '(node.className || "").split' is undefined)
shouldWatchByNative — Common.js:257
traceDomTree — googlemaps-cdv-plugin.js:516
(anonymous function) — googlemaps-cdv-plugin.js:315

I have an SVG chart, the SVG chart has inside g and path tags. The problem is that the output of path.className is not a string, it is SVGAnimatedString, which lacks the split method. The same is true for the g tag.

path classname

Solution: Update Common.js to include path and g in the ignoreTags.

var ignoreTags = [
  "pre", "textarea", "p", "form", "input", "caption", "canvas", "svg", "g", "path"
];

Is there something else to change maybe in googlemaps-cdv-plugins.js ? Maybe doNotTraceTags ? @wf9a5m75 let me know and I can send a PR.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wf9a5m75commented, Mar 1, 2018

No ETA.

1reaction
leandrozcommented, Mar 1, 2018

@wf9a5m75 I have already reproduced it and already sent a PR, but I am thinking maybe doing this is better:

if(document.getElementById("el") instanceof SVGElement) {
    console.log("It's an SVG element");
}

from https://stackoverflow.com/questions/20748836/how-do-i-tell-if-a-dom-element-is-html-or-svg

That way we fix it once and for all the tags.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exclude svg element from (certain) rule checks #137 - GitHub
Suppose the following snippet inside your html: The linter will take exception to the viewBox attribute name, failing rule E002 ...
Read more >
Blocks with SVG icon become invalid when I'm not logged in ...
Everything seems fine at first, but when I visit the front-end the SVG icon is gone. After inspection I see that the actual...
Read more >
Unable to import svg files in typescript - Stack Overflow
If you use webpack, you can do this by creating a custom types file. Create a file named custom.d.ts with the following content:...
Read more >
Managing SVG Interaction With The Pointer Events Property
Let's take a look at how to shape the interactivity of SVG images — that is, control which parts of the document can...
Read more >
5 Gotchas You're Gonna Face Getting Inline SVG ... - CSS-Tricks
To my mind, only being able to style the SVG directly (and not the cloned instance), is less than ideal. Therefore, my recommendation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found