8000 Add info about last version supporting IE9 and IE10 and remove obsolete code by archmoj · Pull Request #5373 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Add info about last version supporting IE9 and IE10 and remove obsolete code #5373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
simplify and inline apply calls in loggers
  • Loading branch information
archmoj committed Jan 6, 2021
commit bc2b0d112b14db802978c76f3e59aab6e0f87155
14 changes: 3 additions & 11 deletions src/lib/loggers.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ loggers.log = function() {
for(i = 0; i < arguments.length; i++) {
messages.push(arguments[i]);
}
apply(console.trace || console.log, messages);
console.trace.apply(console, messages);
}

if(dfltConfig.notifyOnLogging > 1) {
Expand All @@ -50,7 +50,7 @@ loggers.warn = function() {
for(i = 0; i < arguments.length; i++) {
messages.push(arguments[i]);
}
apply(console.trace || console.log, messages);
console.trace.apply(console, messages);
}

if(dfltConfig.notifyOnLogging > 0) {
Expand All @@ -70,7 +70,7 @@ loggers.error = function() {
for(i = 0; i < arguments.length; i++) {
messages.push(arguments[i]);
}
apply(console.error, messages);
console.error.apply(console, messages);
}

if(dfltConfig.notifyOnLogging > 0) {
Expand All @@ -81,11 +81,3 @@ loggers.error = function() {
notifier(lines.join('<br>'), 'stick');
}
};

function apply(f, args) {
if(f && f.apply) {
// `this` should always be console, since here we're always
// applying a method of the console object.
f.apply(console, args);
}
}
0