Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8538751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:11:46+00:00 2026-06-11T11:11:46+00:00

I ran into a strange problem with a content script. The content script is

  • 0

I ran into a strange problem with a content script. The content script is defined as "run_at" : "document_end" in the manifest. After a page is loaded the script inserts an object tag into the page (if the tag with predefined id does not exist yet), and sets some properties in it, such as type, width, height, innerHTML, and title. All works fine here.

function checkForObject()
{
  var obj = document.getElementById("unique_id");
  if(obj == null)
  {
    var d = document.createElement("object");
    d.id = "unique_id";
    d.width = "1";
    d.height = "1";
    d.type = "application/x-y-z";
    d.title = "1000";
    d.style.position = "absolute";
    d.style.left = "0px";
    d.style.top = "0px";
    d.style.zIndex = "1";
    document.getElementsByTagName("body")[0].appendChild(d);
  }
}

checkForObject();

I see the new object in the page html-code with proper values in its properties.

Some time later I need to read the title property of the object in the same content script. The code is simple:

function ReadTitle()
{
  var obj = document.getElementById("unique_id");
  var value = obj.title; // breakpoint
  console.log(value);
  // TODO: want to use proper title value here
}

The function is called from background.html page:

chrome.tabs.onActivated.addListener(
function(info)
{
  chrome.tabs.executeScript(info.tabId, {code: 'setTimeout(ReadTitle, 250);'});
});

Unfortunately, in ReadTitle I’m getting not what I expect. Instead of current value of the title I see the logged value is:

function title() { [native code] }

If I set a breakpoint at the line marked by // breakpoint comment, I see in the watcher that all object properties including the title are correct. Nevertheless, the variable value gets the abovementioned descriptive string.

Apparently, I have missed something simple, but I can’t figure it out.

The answer. It was a bug in the npapi plugin, which hosts the object of used type. My apologies for all who have read the question with intention to help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T11:11:47+00:00Added an answer on June 11, 2026 at 11:11 am

    The NPAPI plugin used in the object erroneously reported title as supported method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ran into a strange problem today, after renaming a couple of images in
I ran into a strange problem. In my unit test, I want to check
Ran into a strange problem in PHP today and I'm wondering if someone can
I ran into a strange problem using a C# webservice client to call a
I just ran into to strange problem, I have a custom tableview cell with
I ran into a strange problem. I use DIV as a container, and put
I'm quite new to multithreading and today I ran into this strange problem. I
i ran into a strange problem when trying to flip the y-axis of a
I ran into a strange problem these days. One of my apps which is
While making my code, i ran into a strange problem. I hold 1 file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.